[PHP] Dynamic Form checking

2003-09-08 Thread Aris Santillan
hi

this is the dynamic forms



for($s=0;$s<$num;$s++)
  {
$result = mssql_fetch_array($query);

$result[2] = number_format($result[2], 2);



echo"";
echo  " ";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";
echo  "";

echo  "";
echo"";


  }




this the code that will get items that are checked


foreach($check as $checkitem)
 {



echo $quantity[$checkitem] .  " " . $discount[$checkitem] . " " . $part_no[$checkitem] 
. " " . $price[$checkitem] . " " . $salesperson_code[$checkitem] . " " . 
$customer_code[$checkitem] . " " . $ship_to_code[$checkitem] . " " . " " . 
$status[$checkitem] . " " .  $date[$checkitem] . "";


 }
 
---


the problems / situation


how can i check or validate

it should be. if someone filled up the $quantity[] field, she / he must check the 
$check[] field or if a use check the $check[] field
he must put something on the $quantity[] field. and 

otherwise empty $quantity[] field and empty $check[] field is allowed,  






thanks in advance












Re: [PHP] Validating Subdomain E-mail Addresses Using Regular Expressions

2003-09-08 Thread Jason Wong
On Monday 08 September 2003 14:08, Jami Moore wrote:
> I have been trying all weekend to get this right, and so far it does not
> validate an e-mail address with a subdomain.

[snip]

> From my understanding, this should allow me to validate an e-mail
> address like  
> [EMAIL PROTECTED] Has anyone been able to come up with a
> regular expression that will allow php to validate an e-mail address
> like this?

Search the archives or ask google.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Never underestimate the power of human stupidity
-- Sad Truths of Life n20
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Running PHP scripts in PHP Nuke

2003-09-08 Thread Jason Wong
On Monday 08 September 2003 01:27, Dan Anderson wrote:
> > You need to be more specific. What error do you get?
>
> I don't get any error.  It will ask me for the HTML code to the page and
> just not work.  So I'm assuming that instead of being processed by
> Apache and a preprocessor that can send it to PHP it's being printed to
> the screen.

You would be better off asking on a php-nuke forum/list.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
"Surely you can't be serious."
"I am serious, and stop calling me Shirley."
-- "Airplane"
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] sending values in textbox

2003-09-08 Thread Angelo Zanetti
Hi

I want to be able to send the vlaues that a user enters in a couple of input
fields. However, my register_globals is set to off. So how do I do it using
an image and HRef instead of a submit button?

I have the following:


 





  ");
?>

But this doesnt seem to get the value of whats in the txtContactNo field.
Should the  be after the php or inside php, so that it knows what
txtContactNo is?

any help would be appreciated

TIA

Angelo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: highlighting multi term search results

2003-09-08 Thread jonas_weber
Am Montag, 08.09.03 um 04:21 Uhr schrieb Lee O'Mara:

Why not just allow for bold tags in the search term? What I mean is, I 
think you can get the results you want by allowing any number of open 
or close bold tags between each letter of the search term.
i thought so too (but i had no idea how to code it); this must be a 
solution.
i've tested your function like this:


function highlight($src_terms, $src_terms_int, $result) {
$i = 0;
  while ($i < $src_terms_int) {
  $termWithOptionalBold = preg_replace('/(.)/', '(<\/?b>) 
*\1',$src_terms[$i]);
  $result = preg_replace('/(<\/?b>)*('.$termWithOptionalBold.')(<\/?b>) 
*/si', '\2', $result);
  $i++;
  }
return $result;
}

$search = "te est"; // user input to search for
$src_terms = explode(" ", $search);
$src_terms_int = count($src_terms);
$result = "this is just a test"; // result from database
print highlight($src_terms, $src_terms_int, $result);
?>
but it didn't highlight anything.

btw, the bold tag in this example is used to simplify it and stands for 
something like  what makes it even 
trickier, i guess.

thanks for your help!
jns
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problem Coding a Tutorial

2003-09-08 Thread Stephen Tiano
I found a new book for again starting out to learn PHP/MySQL Web App 
programming. I've begun exercises toward that end.

So far I've opened MySQL--I'm on a Macintosh PowerBook, so that's 
UNIX--as root and created a database I called guest_recorder. Then I 
GRANTed ALL to a new user (me) with a password. I then quit MySQL.

Next I opened MySQL again as the new user I created, did a USE 
guest_recorder and then created my first table guest_info. The table had 
five columns: name, location, email, url, and comments. When I did a 
DESCRIBE guest_info, it properly displayed the columns.

Then I typed "dbconnect.php":


followed by "create_entry.php":



Create Entry



if ($submit == "Sign!")
{
$query = "insert into guest_info
(name,location,email,url,comments) values
<'$name', '$location', '$email', '$url', '$comments')"
;
mysql_query($query) or die (mysql_error());
?>
Thanks!
View My Guest Book!

and "sign.php":

When I open "create_entry.php" in my browser, the form and its five 
fields appear correctly, and I fill them out. I then hit the "Sign, 
dammit!" button.

I was expecting the "Thanks!" and "View My Guest Book!" messages, but 
instead am greeted with the same form with its five blank fields so's I 
can type in info for name, location, email, url, and comments.

When I go to view the table named "guest_info" in the database named 
"guest_recorder" using SELECT * FROM guest_info, I'm told "Empty set".

If the form's info isn't making it to the table, I'm thinking I need 
$_POST statements--as in $_POST["name"], $_POST["location"], 
etc.--somewhere to get each field's info into the table. But where do I 
put those lines and in which file: "create_entry.php" or "sign.php"?

Thank you.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Problem Coding a Tutorial

2003-09-08 Thread Kae Verens
Stephen Tiano wrote:

if ($submit == "Sign!")
if($_POST['submit']=='Sign!')

{
$query = "insert into guest_info
(name,location,email,url,comments) values
<'$name', '$location', '$email', '$url', '$comments')"
('$_POST[name]','$_POST[location]','$_POST[email]','$_POST[url]','$_POST[comments]')"

If the form's info isn't making it to the table, I'm thinking I need 
$_POST statements--as in $_POST["name"], $_POST["location"], 
etc.--somewhere to get each field's info into the table. But where do I 
put those lines and in which file: "create_entry.php" or "sign.php"?
try echoing out what you think should be at different points in the file 
- "echo $_POST['submit'];" before the if statement, for example.

Kae

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem Coding a Tutorial

2003-09-08 Thread MuToGeN
Hello Stephen,

You say "then hit the "Sign, dammit!" button", and in your script you
have "...if ($submit == "Sign!")...".
Obviously, the problem is that "else" block is executed instead of
"if". It's better to use some other variable to check whether the form
is filled or not, something like
"...if(strlen($_REQUEST["comments"])>0)..."
Also, the problem may be caused by register_globals turned off...

ST> I found a new book for again starting out to learn PHP/MySQL Web App 
ST> programming. I've begun exercises toward that end.

ST> So far I've opened MySQL--I'm on a Macintosh PowerBook, so that's 
ST> UNIX--as root and created a database I called guest_recorder. Then I 
ST> GRANTed ALL to a new user (me) with a password. I then quit MySQL.

ST> Next I opened MySQL again as the new user I created, did a USE 
ST> guest_recorder and then created my first table guest_info. The table had 
ST> five columns: name, location, email, url, and comments. When I did a 
ST> DESCRIBE guest_info, it properly displayed the columns.

ST> Then I typed "dbconnect.php":

ST>  mysql_connect("localhost", "", "---") or
ST> die ("Could not connect to database");
ST> mysql_select_db("guest_recorder") or
ST> die ("Could not select database");
?>>

ST> followed by "create_entry.php":

ST> 
ST> 
ST> Create Entry
ST> 
ST> 

ST>  include("dbconnect.php");

ST> if ($submit == "Sign!")
ST> {
ST> $query = "insert into guest_info
ST> (name,location,email,url,comments) values
ST> <'$name', '$location', '$email', '$url', '$comments')"
ST> ;
ST> mysql_query($query) or die (mysql_error());
?>>
ST> Thanks!
ST> View My Guest Book!
ST>  }
ST> else
ST> {
ST> include("sign.php");
ST> }
?>>

ST> and "sign.php":

ST> When I open "create_entry.php" in my browser, the form and its five 
ST> fields appear correctly, and I fill them out. I then hit the "Sign, 
ST> dammit!" button.

ST> I was expecting the "Thanks!" and "View My Guest Book!" messages, but 
ST> instead am greeted with the same form with its five blank fields so's I 
ST> can type in info for name, location, email, url, and comments.

ST> When I go to view the table named "guest_info" in the database named 
ST> "guest_recorder" using SELECT * FROM guest_info, I'm told "Empty set".

ST> If the form's info isn't making it to the table, I'm thinking I need 
ST> $_POST statements--as in $_POST["name"], $_POST["location"], 
ST> etc.--somewhere to get each field's info into the table. But where do I 
ST> put those lines and in which file: "create_entry.php" or "sign.php"?

ST> Thank you.



-- 
Best regards,
 MuToGeNmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] null values

2003-09-08 Thread Aris Santillan
hi

how to count null values in an array?

tnx


[PHP] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
I passed value
main.php?name=$name&id=$id&id1=$id1  to next page
where $id has value "###"
In the next page I was not able to get the $id and $id1 values 
and I am able to get the two values $id1 and $name when I used
main.php?name=$name&id1=$id1
What might be the problem?

-Thanks & regards,
Murugesan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: null values

2003-09-08 Thread Bogdan Stancescu

Aris Santillan wrote:

hi

how to count null values in an array?

tnx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem Coding a Tutorial

2003-09-08 Thread murugesan
This may help you.

//createenrty.php

RE: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread Angelo Zanetti
try this


main.php?name=" . $name . "&id=" . $id . "&id1=" . $id1 . "


HTH

-Original Message-
From: murugesan [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Passing query parameter which has value "###"


I passed value
main.php?name=$name&id=$id&id1=$id1  to next page
where $id has value "###"
In the next page I was not able to get the $id and $id1 values 
and I am able to get the two values $id1 and $name when I used
main.php?name=$name&id1=$id1
What might be the problem?

-Thanks & regards,
Murugesan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
Not at all. I tried it.
When I see the properties of that page it is showing me
http://172.16.1.193/main.php?name=murugesh&id=#&[EMAIL PROTECTED]

but the actual value for id is ###

-Murugesan

- Original Message -
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>; "murugesan"
<[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:06 PM
Subject: RE: [PHP] Passing query parameter which has value "###"


> try this
>
>
> main.php?name=" . $name . "&id=" . $id . "&id1=" . $id1 . "
>
>
> HTH
> -Original Message-
> From: murugesan [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 08, 2003 1:05 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Passing query parameter which has value "###"
>
>
> I passed value
> main.php?name=$name&id=$id&id1=$id1  to next page
> where $id has value "###"
> In the next page I was not able to get the $id and $id1 values
> and I am able to get the two values $id1 and $name when I used
> main.php?name=$name&id1=$id1
> What might be the problem?
>
> -Thanks & regards,
> Murugesan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Sid
Hello,

Many people ask me if ASP.net is faster than PHP. I know for a fact that it is 
(because PHP is not optimized).
But then what about optimized PHP and compiled ASP.net. This would be a fairer 
comparison in my opinion. Anyone seen any benchmarks of this? If so please let me know 
as I would not like to pass on any wrong info.

Thanks

- Sid

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Not at all. I tried it.
> When I see the properties of that page it is showing me
> http://172.16.1.193/main.php?name=murugesh&id=#&[EMAIL PROTECTED]
> 
> but the actual value for id is ###
> 
> -Murugesan
> 
> - Original Message -
> From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>; "murugesan"
> <[EMAIL PROTECTED]>
> Sent: Monday, September 08, 2003 5:06 PM
> Subject: RE: [PHP] Passing query parameter which has value "###"
> 
> 
> > try this
> >
> >
> > main.php?name=" . $name . "&id=" . $id . "&id1=" . $id1 . "
> >
> >
> > HTH
> > -Original Message-
> > From: murugesan [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 08, 2003 1:05 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Passing query parameter which has value "###"
> >
> >
> > I passed value
> > main.php?name=$name&id=$id&id1=$id1  to next page
> > where $id has value "###"
> > In the next page I was not able to get the $id and $id1 values
> > and I am able to get the two values $id1 and $name when I used
> > main.php?name=$name&id1=$id1
> > What might be the problem?
> >

You might want to use something like urlencode - the # is usually used as 
the symbol for a jump to anchor point in the target page.

-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Try/Catch

2003-09-08 Thread --
Well, may question is about the Scope of Throwed
Execeptions. Look my example:

I have something like this:

//...cut...
try {
 $res =
$this->curl->GET($this->url[0]);
} catch (Exception $e) {
 return FALSE;
}
   //...cut...

and in the curl class, something like this:   
   

   //...cut...
  $result = curl_exec ($this->rs);
  $this->err = curl_errno($this->rs);
  if ($this->err)
  throw new
Exception(curl_error($this->rs) . " (error in GET)");
  //...cut...

But it doesn´t work. Why? Am I wrong? The throwed
exception is out of scope or maybe it´s a bug


Regards,

Atenciosamente, 
Eduardo R. Maciel 
RedHat Certified Engineer 
Cert nr: 807303591107614 
http://www.redhat.com/training/certification/verify/


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread Chris Hayes
At 13:04 8-9-03, you wrote:
I passed value
main.php?name=$name&id=$id&id1=$id1  to next page
where $id has value "###"
In the next page I was not able to get the $id and $id1 values
and I am able to get the two values $id1 and $name when I used
main.php?name=$name&id1=$id1
What might be the problem?


The # in a url is used for the in-page anchors, e.g. if you have an anchor 
in your page , then a url such as page.html#chapter2 
will jump to that location in the page. So the part after the # is cut off 
by the browser, i suppose.

Try this:
';
?>
This changes the # to a code (% followed by some number)
(check urlencode in the manual)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Angelo Zanetti
Apparently if you read the terms of agreement when installing .NET you can't
publish your benchmarking results without their permission.

just a thought.

would be interesting to see comparison, and maybe also JSP, cold fusion

-Original Message-
From: Sid [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 2:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Benchmarking PHP vs ASP.net


Hello,

Many people ask me if ASP.net is faster than PHP. I know for a fact that it
is (because PHP is not optimized).
But then what about optimized PHP and compiled ASP.net. This would be a
fairer comparison in my opinion. Anyone seen any benchmarks of this? If so
please let me know as I would not like to pass on any wrong info.

Thanks

- Sid

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread Angelo Zanetti
yes David is right!!

why dont you pass the password as a session variable? have you thought of
it? I dont know how appropriate/inappropriate it will be.

Angelo

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2003 1:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Passing query parameter which has value "###"


In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...
> Not at all. I tried it.
> When I see the properties of that page it is showing me
> http://172.16.1.193/main.php?name=murugesh&id=#&[EMAIL PROTECTED]
>
> but the actual value for id is ###
>
> -Murugesan
>
> - Original Message -
> From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>; "murugesan"
> <[EMAIL PROTECTED]>
> Sent: Monday, September 08, 2003 5:06 PM
> Subject: RE: [PHP] Passing query parameter which has value "###"
>
>
> > try this
> >
> >
> > main.php?name=" . $name . "&id=" . $id . "&id1=" . $id1 . "
> >
> >
> > HTH
> > -Original Message-
> > From: murugesan [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 08, 2003 1:05 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Passing query parameter which has value "###"
> >
> >
> > I passed value
> > main.php?name=$name&id=$id&id1=$id1  to next page
> > where $id has value "###"
> > In the next page I was not able to get the $id and $id1 values
> > and I am able to get the two values $id1 and $name when I used
> > main.php?name=$name&id1=$id1
> > What might be the problem?
> >

You might want to use something like urlencode - the # is usually used as
the symbol for a jump to anchor point in the target page.

--
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Jay Blanchard
[snip]
Many people ask me if ASP.net is faster than PHP. I know for a fact that
it is (because PHP is not optimized).
But then what about optimized PHP and compiled ASP.net. This would be a
fairer comparison in my opinion. Anyone seen any benchmarks of this? If
so please let me know as I would not like to pass on any wrong info.
[/snip]

As has been mentioned several times, comparing ASP.net (or 'plain' ASP)
to PHP is comparing apples and oranges unless you are comparing the
processing engine itself. In this day and age where processor power is
what it is and growing according to Moore, speed comparisons are
basically fodder for smirking 'my server can beat up your server'.

Let's say I have a database with 1 million records. I need to update
10,000 of those records. On the same server code supported by ASP.net
runs in 1.032 seconds while code in PHP runs in 1.067 seconds. OMG! PHP
is slower. The difference is .035 seconds. Does this matter? Who is
asking which is faster? Why do they care? Are they looking for a reason
to choose one technology over another?

Since ASP.net namespaces are compiled that creates a fundamental
difference when comparing to PHP. What language are you using to create
the ASP.net namespace? 

All in all I think it a waste to even entertain a resposnse to folks who
would ask this question other than to say 'a comparison between these
technologies is impossible due to the differences'.

Have a pleasant and productive day.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Sid
> Apparently if you read the terms of agreement when installing .NET
> you can't publish your benchmarking results without their
> permission.

Is Micro$oft©® scared of being beaten? Now I am going to get the benchmarking results 
by hook or crook! Now I HATE M$. aahh!!

I've seen a comparison of JSP PHP and CF (Don't remember where - All I know is that it 
came up among the top results in google for I think 'ASP.net vs PHP')

- Sid

On Mon, 08 Sep 2003 14:25:20 +0200, Angelo Zanetti wrote:
> Apparently if you read the terms of agreement when installing .NET
> you can't publish your benchmarking results without their
> permission.
>
> just a thought.
>
>
> would be interesting to see comparison, and maybe also JSP, cold
> fusion
>
>
> -Original Message-
> From: Sid [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 08, 2003 2:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Benchmarking PHP vs ASP.net
>
>
> Hello,
>
>
> Many people ask me if ASP.net is faster than PHP. I know for a fact
> that it is (because PHP is not optimized).
> But then what about optimized PHP and compiled ASP.net. This would
> be a fairer comparison in my opinion. Anyone seen any benchmarks of
> this? If so please let me know as I would not like to pass on any
> wrong info.
>
> Thanks
>
>
> - Sid
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php, denial of service attack

2003-09-08 Thread John W. Holmes
nabil wrote:
I have a postnuke website and i had denial of service attack
the point is the attack is one only the home php page ... with cpu 100% and
few apache procceses..
Any comment ?

It was not me.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Procedural Code Issue

2003-09-08 Thread Marek Kilimajer
Safe mode? If safe mode is on and the image is owned by apache, the 
script that is owned by your acount cannot read the image.

Nathan Taylor wrote:
Hey Guys,

I am developing code that uses GD to create and store an image but it is giving me trouble with GetImageSize, maybe you guys can offer some ideas.  Here's my code:

echo "\n";

$img_data = GetImageSize($imgpath.$imgname_full);

The first line creates and stores the image while the second line calls file information on it.  Procedurally, the image exists at the point which GetImageSize is called, however, GetImageSize returns a false result on the pointer when it looks for the file. All the paths are fine but there is something going cock-eyed during the execution.

Can anyone offer ideas?  I have already tried both declaring an absolute path and checking the variables arlready.

Thanks,
Nathan Taylor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Form data

2003-09-08 Thread Hardik Doshi
Hi Group,

I have a form for adding a university course details.
It has some fields for which the parent form calls the
child form. For example: Each course is associated
with at least one faculty member. So when the user
enters faculty member then first user needs to find
the appropriate faculty member using the search module
and then needs to append that faculty member to the
course details form by clicking the button next to
faculty member's name on the search results. 

Now my question is once user leaves the parent form to
the search form for the faculty member, at that time
how can i store the already entered information on the
parent form. So i can retrieve it back once i come to
the parent form after finding the appropriate faculty
member. 

I would like to know your ideas for this problem. I
have think two possible ways to do it. One is to store
entire $_POST array of parent form into the database
associated with the session id. Second is to store
$_POST array of parent form into the session file
itself. But i don't know which one is the efficient
and real world solution. Even i would like to know
other possible solutions.

Please let me know.

Thanks

Hardik Doshi

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form data

2003-09-08 Thread CPT John W. Holmes
From: "Hardik Doshi" <[EMAIL PROTECTED]>

> I have a form for adding a university course details.
> It has some fields for which the parent form calls the
> child form. For example: Each course is associated
> with at least one faculty member. So when the user
> enters faculty member then first user needs to find
> the appropriate faculty member using the search module
> and then needs to append that faculty member to the
> course details form by clicking the button next to
> faculty member's name on the search results.
>
> Now my question is once user leaves the parent form to
> the search form for the faculty member, at that time
> how can i store the already entered information on the
> parent form. So i can retrieve it back once i come to
> the parent form after finding the appropriate faculty
> member.
>
> I would like to know your ideas for this problem. I
> have think two possible ways to do it. One is to store
> entire $_POST array of parent form into the database
> associated with the session id. Second is to store
> $_POST array of parent form into the session file
> itself. But i don't know which one is the efficient
> and real world solution. Even i would like to know
> other possible solutions.

I'd just store it in the session. If you put it in the database, then you
have to worry about cleanup. Session cleanup is automatic.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Dan Anderson
>  OMG! PHP
> is slower. The difference is .035 seconds. Does this matter? Who is
> asking which is faster? Why do they care? Are they looking for a reason
> to choose one technology over another?

 

I totally agree with you, but I find it funny that many times when
talking to people they don't seem to realize that unless you are talking
about an enterprise solution for a Fortune 500 company, it is the
/developer/ time that costs the most.  So let's assume a developer can
get a solution done in PHP in a weeks worth of work and in ASP.net for 2
weeks.  Then you have spent enough to buy a second server for redundancy
on a solution that is .035 seconds faster.

But hey, I don't complain much.  It keeps me employed.

 

-Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Form data

2003-09-08 Thread Marek Kilimajer
Hidden form variables.

Hardik Doshi wrote:

Hi Group,

I have a form for adding a university course details.
It has some fields for which the parent form calls the
child form. For example: Each course is associated
with at least one faculty member. So when the user
enters faculty member then first user needs to find
the appropriate faculty member using the search module
and then needs to append that faculty member to the
course details form by clicking the button next to
faculty member's name on the search results. 

Now my question is once user leaves the parent form to
the search form for the faculty member, at that time
how can i store the already entered information on the
parent form. So i can retrieve it back once i come to
the parent form after finding the appropriate faculty
member. 

I would like to know your ideas for this problem. I
have think two possible ways to do it. One is to store
entire $_POST array of parent form into the database
associated with the session id. Second is to store
$_POST array of parent form into the session file
itself. But i don't know which one is the efficient
and real world solution. Even i would like to know
other possible solutions.
Please let me know.

Thanks

Hardik Doshi

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Form data

2003-09-08 Thread Dan Anderson
Forget about cookies and sessions (because cookies are evil).  The way I
do something like this is:

 $value)
{
   if (!(($key == 'dont_save') OR ($key == 'dont_save_2')))
{ hidden($key, $value); }
}

function hidden($key, $value)
  // saves lots of time
{ print "\n"; }

?>

Then you can keep information from one form to the next.  If you really
want to get tricky add something like: 

 $value)
{
   if (!($_POST['dont_save[{$key}]'] )_
{ hidden($key, $value); }
}

?>

-Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Raditha Dissanayake
Can't resist trowing in my 0.02 either:

As dan pointed out it's so much faster to do things in php. When you 
take into consideration the fact that code on windows never work  the 
way it's supposed you are saving a lot of man hours.

Second point worth mentioning is that a given languages/frameworks will 
be faster at certains tasks while slower at another task. Thus as jay 
has explained generic benchmarks are realy of little significance.

Dan Anderson wrote:

OMG! PHP
is slower. The difference is .035 seconds. Does this matter? Who is
asking which is faster? Why do they care? Are they looking for a reason
to choose one technology over another?
   

 

I totally agree with you, but I find it funny that many times when
talking to people they don't seem to realize that unless you are talking
about an enterprise solution for a Fortune 500 company, it is the
/developer/ time that costs the most.  So let's assume a developer can
get a solution done in PHP in a weeks worth of work and in ASP.net for 2
weeks.  Then you have spent enough to buy a second server for redundancy
on a solution that is .035 seconds faster.
	But hey, I don't complain much.  It keeps me employed.

 

-Dan

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Chris Shiflett
--- Sid <[EMAIL PROTECTED]> wrote:
> Many people ask me if ASP.net is faster than PHP. I know for a fact
> that it is (because PHP is not optimized).

Don't be so easily fooled by hollow terms.

Go here:

http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm

Start with the slide entitled Benchmarking PHP. You'll see PHP perform against
yScript2, the second generation of Yahoo!'s proprietary C/C++ engine, and YSP,
an extremely fast mod_perl based solution.

Why bother comparing PHP to ASP in terms of performance when it can compete
with the performance of two of the fastest engines in the world? People don't
choose ASP for performance.

Here is another benchmark:

http://www.chamas.com/bench/index.html

If you want some opinions on how the languages compare, search Google. Here is
a link I found:

http://www.netconcepts.com/news/php_vs_asp.php

> I've seen a comparison of JSP PHP and CF (Don't remember where -
> All I know is that it came up among the top results in google for
> I think 'ASP.net vs PHP')

Yes, PHP was the top performer and ColdFusion was the easiest to develop in.

Lastly, ASP ties you to a particular platform, and a particularly bad one at
that.

Choose ASP if you're an NBM shop. Choose mod_perl if you really need that
fractional increase in speed. Choose PHP if you like it. Choose JSP if you're
really into Java and think complaints about its performance are unfounded.
Choose ColdFusion if you can write HTML and think that qualifies you as a Web
developer. Most importantly, don't choose a language based on what someone on a
mailing list tells you. :-)

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Validating Subdomain E-mail Addresses Using Regular Expressions

2003-09-08 Thread Jami Moore
Jason,

I have already done so and not found an answer, which is why I am asking
the group now. Do you have a suggestion or have you found a link that
may help? That would be ten times more useful than, "Search the archives
or ask google."


Jami Moore
LightSpark Digital Designs
[EMAIL PROTECTED]
http://www.lightsparkdigital.com/


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 


Search the archives or ask google.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHPMVC

2003-09-08 Thread Jonathan Villa
has anyone used PHPMVC (from phpmvc.net) and if so, what is your
experience with it?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Validating Subdomain E-mail Addresses Using Regular Expressions

2003-09-08 Thread Jackson Miller
I see too easy options for you.

1) use the Validate class in PEAR.  It achieves what you want.

2) look at the Validate class in PEAR and copy

-Jackson


On Monday 08 September 2003 10:01, Jami Moore wrote:
> Jason,
>
> I have already done so and not found an answer, which is why I am asking
> the group now. Do you have a suggestion or have you found a link that
> may help? That would be ten times more useful than, "Search the archives
> or ask google."
>
>
> Jami Moore
> LightSpark Digital Designs
> [EMAIL PROTECTED]
> http://www.lightsparkdigital.com/
>
>
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
>
>
> Search the archives or ask google.

-- 
jackson miller
 
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
 
 
cold feet presents Emma
the world's easiest email marketing
Learn more @  http://www.myemma.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Creating a Calender

2003-09-08 Thread Dan Anderson
Does anybody know how to generate calendars easily?  (i.e. print out
complete calenders from the current month on)

Thanks in advance,

-Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Validating Subdomain E-mail Addresses Using Regular Expressions

2003-09-08 Thread Javier Tacon

$email = "[EMAIL PROTECTED]";
if(eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $email)) print "Valid";

It should work.


Javier Tacón Iglesias.


-Mensaje original-
De: Jami Moore [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 08 de septiembre de 2003 17:02
Para: [EMAIL PROTECTED]
Asunto: RE: [PHP] Validating Subdomain E-mail Addresses Using Regular
Expressions
Importancia: Baja


Jason,

I have already done so and not found an answer, which is why I am asking
the group now. Do you have a suggestion or have you found a link that
may help? That would be ten times more useful than, "Search the archives
or ask google."


Jami Moore
LightSpark Digital Designs
[EMAIL PROTECTED]
http://www.lightsparkdigital.com/


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 


Search the archives or ask google.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating a Calender

2003-09-08 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]>


> Does anybody know how to generate calendars easily?  (i.e. print out
> complete calenders from the current month on)

I'd check out PEAR or phpclasses.org. I'm sure something is already written,
but I don't know of any personally.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Creating a Calender

2003-09-08 Thread Dave Dash
I've got a few elementry classes that might help, I think you just need to
instantiate the class and then run the display method.


"Dan Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anybody know how to generate calendars easily?  (i.e. print out
> complete calenders from the current month on)
>
> Thanks in advance,
>
> -Dan


begin 666 cal.css
M+F-A;&5N9&%R('L*"6)O'0M86QI9VXZ(&-E;G1E
MPH)9F]N="US
M:7IE.B!S;6%L;#L*"69O;G0M=V5I9VAT.B!B;VQD.PH)9&ES<&QA>3IB;&]C
M:SL*"6)O2!["@EF
M;VYT+69A;6EL>[EMAIL PROTECTED]&[EMAIL PROTECTED]"!![EMAIL PROTECTED]( I]"@HN9W)A>2!["@EC;VQO2!["@EC;VQOPH)
M9F]N="UW96EG:'0Z(&)O;&0["@ET97AT+6%L:6=N.B!C96YT97(["GT*"BYC
M86QE;F1A7,L(&5T8RX-"B J+PT*#0HD;FP@/2 B7&XB.PT*)'1A8B ](")<="([
M#0H-"F-L87-S($-A;&5N9&%R('L-"@EV87(@)&QI;FL["0D)[EMAIL PROTECTED])R87D@
M;[EMAIL PROTECTED]),65A7(@*B\-"@T*"[EMAIL PROTECTED]@9G5N8W1I;[EMAIL PROTECTED]
M87(-"@D-"@EF=6YC=&EO;B!S971396QE8W1E9$1A>[EMAIL PROTECTED]&%Y+" D;6]N=&@L
M("1Y96%R*0T*"7L-"@D))'1H:7,M/G-E;&5C=&5D1&%Y(#T@;6MT:6UE*# L
M(# L(# L("1M;VYT:"P@)&1A>2P@)'EE87(I.PT*"7T-"@EF=6YC=&EO;B!S
M971,:6YK*"1D87DL("1L:6YK+" D9&5S8R ]($Y53$PI#0H)>PT*"0DD=&AI
M0T*"2 J
M+PT*"69U;F-T:6]N('-E=$QI;FM"87-E9$]N1&%Y*"1U7,@:6X@;6]N=&@@
M*B\-"@D)#0H)"69OPT*"0D))'(@
M+CT@(B!I9#TD:60B.PT*"0E]#0H)"21R("X]("<^)R N("1S=')I;F<@+B G
M/"]S<&%N/B<[#0H)"7)E='5R;B D2P@)&=R87D],"D-"@E[#0H)"21G22D[#0H)"7)E='5R;B D0T*
M"0T*"69U;F-T:6]N(&%N8VAO<[EMAIL PROTECTED])L+" D;&EN:RP@)&-L87-S([EMAIL PROTECTED],
M3"P@)'1I=&QE([EMAIL PROTECTED],3"P@)&ED([EMAIL PROTECTED],3"D-"@E[#0H)"21R(#T@(CQA
M(&AR968]7"(D=7)L7"(B.PT*"0EI9B H)&-L87-S*2![#0H)"0DDPT*"0D))'(@+CT@(B!I9#U<(B1I9%PB(CL-"@D)?0T*"0DDPT*"0EG;&]B86P@)&YL+" D=&%B.PT*"0DD9&%T92 ]
M("1T:&ES+3YD871E.PT*"0D-"@D))'(@(#T@)SQD:[EMAIL PROTECTED]PT*
M"0D))'(@+CT@)'1A8B N("<\[EMAIL PROTECTED][EMAIL PROTECTED]2!O9B!M;VX-"@T*"0DD3L@)&DK*RD@>PT*"0D))'(@+CT@)'1H:7,M/G-P86Y$87DH)R9N
M8G-P.R7,@*B\-"@D)9F]R("@D:2 ]
M(#$[("1I(#P]("1D87ES26Y-;VYT:#L@)&DK*RD@>PT*"0D):68H*"1M;VYT
M:%-T87)T1&%Y("L@)&DI("[EMAIL PROTECTED] ]/2 Q("8F("1I("$](#$I('L-"@D)"0DD
M65A2<[#0H)"0D)"21I9" @(" ]
M("=T;V1A>2<[#0H)"0D)?2!E;'-E('L-"@D)"0D))&-L87-S(#T@)V1A>2<[
M#0H)"0D)"21I9" @(" ]($Y53$P[#0H)"0D)?0D-"@D)"0EI9B H)&-U65A
M65A22 K("1I*2 E(#<@/3T@,"[EMAIL PROTECTED]'P@)&D@/3T@)&1A>7-)
M;DUO;G1H*2![#0H)"0D))'(@+CT@)&YL("X@)'1A8B N("<\+V1I=CXG("X@
M)&YL.PT*"0D)?0T*"0D)#0H)"[EMAIL PROTECTED];W(-"@D):[EMAIL PROTECTED]&EShttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Passing query parameter which has value "###"

2003-09-08 Thread murugesan
Thanks for the reply.It is working

-Murugesan
- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:15 PM
Subject: Re: [PHP] Passing query parameter which has value "###"


> At 13:04 8-9-03, you wrote:
> >I passed value
> >main.php?name=$name&id=$id&id1=$id1  to next page
> >where $id has value "###"
> >In the next page I was not able to get the $id and $id1 values
> >and I am able to get the two values $id1 and $name when I used
> >main.php?name=$name&id1=$id1
> >What might be the problem?
>
>
> The # in a url is used for the in-page anchors, e.g. if you have an anchor
> in your page , then a url such as
page.html#chapter2
> will jump to that location in the page. So the part after the # is cut off
> by the browser, i suppose.
>
>
> Try this:
>  echo '';
> ?>
> This changes the # to a code (% followed by some number)
>
> (check urlencode in the manual)
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Creating a Calender

2003-09-08 Thread Curt Zirzow
* Thus wrote Dave Dash ([EMAIL PROTECTED]):
> 
> begin 666 cal.css
> M+F-A;&5N9&%R('L*"6)Ohttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] upload problems

2003-09-08 Thread Doug Parker
I'm trying to do some uploading on my server, and I'm not getting any value
for my "tmp" upload setting - meaning this code:

$source = $_FILES['cat1_thumb']['tmp_name'];
echo $source;

returns nothing.   The form is fine - meaning that the text input name is
correct and I am indeed selecting a file.  I realized that our
upload_tmp_dir setting was not set, so I had the admin set it, but it still
returns nothing.  Is there another setting I should check?

Thanks

--




http://www.phreshdesign.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] upload problems

2003-09-08 Thread Marek Kilimajer
Does the form contain
?
Doug Parker wrote:
I'm trying to do some uploading on my server, and I'm not getting any value
for my "tmp" upload setting - meaning this code:
$source = $_FILES['cat1_thumb']['tmp_name'];
echo $source;
returns nothing.   The form is fine - meaning that the text input name is
correct and I am indeed selecting a file.  I realized that our
upload_tmp_dir setting was not set, so I had the admin set it, but it still
returns nothing.  Is there another setting I should check?
Thanks

--




http://www.phreshdesign.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] upload problems

2003-09-08 Thread Dan Anderson
If you go to the PHP site they have a nice section on file uploads:

http://us2.php.net/features.file-upload

Double check that $_FILES['cat1_thumb']['error'] == 0

See: http://us2.php.net/manual/en/features.file-upload.errors.php

-Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dynamic Form checking

2003-09-08 Thread Dan Anderson
if $quantity isn't filled you get NULL or FALSE.

so you could use:

if ($_POST['variable'])

etc.

Try posting less code and more question to the list.  Nobody's going to
wade through 5 pages of code to analyze it and give you an answer.

-Dan

On Mon, 2003-09-08 at 03:41, Aris Santillan wrote:
> hi
> 
> this is the dynamic forms
> 
> 
> 
> for($s=0;$s<$num;$s++)
>   {
> $result = mssql_fetch_array($query);
> 
> $result[2] = number_format($result[2], 2);
> 
> 
> 
> echo"";
> echo" disabled> ";
> echo" disabled>";
> echo"";
> echo"";
> echo  "";
> echo  "";
> echo  " value=$salesperson_code>";
> echo  " value=$customer_code>";
> echo  "";
> echo  "";
> echo  "";
> 
> echo"";
> echo"";
> 
> 
>   }
> 
> 
> 
> 
> this the code that will get items that are checked
> 
> 
> foreach($check as $checkitem)
>  {
> 
> 
> 
> echo $quantity[$checkitem] .  " " . $discount[$checkitem] . " " . 
> $part_no[$checkitem] . " " . $price[$checkitem] . " " . 
> $salesperson_code[$checkitem] . " " . $customer_code[$checkitem] . " " . 
> $ship_to_code[$checkitem] . " " . " " . $status[$checkitem] . " " .  
> $date[$checkitem] . "";
> 
> 
>  }
>  
> ---
> 
> 
> the problems / situation
> 
> 
> how can i check or validate
> 
> it should be. if someone filled up the $quantity[] field, she / he must check the 
> $check[] field or if a use check the $check[] field
> he must put something on the $quantity[] field. and 
> 
> otherwise empty $quantity[] field and empty $check[] field is allowed,  
> 
> 
> 
> 
> 
> 
> thanks in advance
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Simple Selection Box

2003-09-08 Thread Scott Miller
I"m attempting to create a simple selection box in PHP, but to no avail.  It
keeps giving me an error:

You have an error in your SQL syntax near '; City='Eureka/'' at line 6

Here's a snip from my code:



 Add New User 


New user added');
  } else {
echo('Error adding new user: ' .
 mysql_error() . '');
  }

?>

Add another User
Return to Users list




Enter the new User:
First Name: 
Last Name: 
UserName: 
Password: 
Phone: 

City:
  Eureka
  Rexford
  Trego
  Fortine
  Other City
 











I've read and read - searched through other's posts, but haven't come up
with what I'm doing wrong.  If anyone could give me a hand, I would greatly
appriciate it.

Scott

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Simple Selection Box

2003-09-08 Thread Jay Blanchard
[snip]
You have an error in your SQL syntax near '; City='Eureka/'' at line 6

  $sql = "INSERT INTO My_Table_Name SET
  First_Name='$fname',
  Last_Name='$lname',
  Username='$username',
  Password='$password',
  Phone_Number='$phone';
  City='$city'";
[/snip]

You left out a comma

  Phone_Number='$phone';
should be
  Phone_Number='$phone',

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simple Selection Box

2003-09-08 Thread Scott Miller
AAHH - stupid mistake - thanks!

Guess I better re-read PHP-101

Thanks,
Scott

- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Scott Miller" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 1:54 PM
Subject: RE: [PHP] Simple Selection Box


> [snip]
> You have an error in your SQL syntax near '; City='Eureka/'' at line 6
> 
>   $sql = "INSERT INTO My_Table_Name SET
>   First_Name='$fname',
>   Last_Name='$lname',
>   Username='$username',
>   Password='$password',
>   Phone_Number='$phone';
>   City='$city'";
> [/snip]
> 
> You left out a comma
> 
>   Phone_Number='$phone';
> should be
>   Phone_Number='$phone',

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Try/Catch

2003-09-08 Thread Jay Blanchard
[snip]
Try/Catch

Well, may question is about the Scope of Throwed
Execeptions. 
[/snip]

What version of PHP are you running? Only V5 has this kind of exception
handling. See http://www.php.net/zend-engine-2.php

HTH!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] adodb and php5

2003-09-08 Thread Gilberto Garcia Jr.
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the result i got 
nothing

PConnect('some', 'some', 'some', 'some');

$seleciona = "
select campo
from tabela
";

$qry =& $conn->Execute($seleciona);

if (!$qry) {
echo $conn->ErrorMsg();
echo "erro";
}
else {
while (!$qry->EOF) {
echo $qry->fields['campo'] . "";

$qry->MoveNext();
}
}
?>





any help?



thanks


RE: [PHP] adodb and php5

2003-09-08 Thread Jay Blanchard
[snip]
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the
result i got nothing

PConnect('some', 'some', 'some', 'some');
[/snip]

You do not need the ADODB connection if you are using MySQL. Are you
connecting to Access or MS SQL? If you are using MySQL look at
http://www.php.net/mysql_connect . For instance, the function you use
above ADONewConnection() does not exist as a PHP function. Do you
declare the function in adodb.inc.php?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] adodb and php5

2003-09-08 Thread CPT John W. Holmes
From: "Gilberto Garcia Jr." <[EMAIL PROTECTED]>


> Does anyone had tested ADODB with php5?
> I can make a query, print the recordcount but when i try to show the
result i got nothing
>
> while (!$qry->EOF) {
> echo $qry->fields['campo'] . "";
>
> $qry->MoveNext();
> }

You might want to ask on the adodb forums:
http://phplens.com/lens/lensforum/topics.php?id=4

Does this work?

while($r = $qry->FetchRow($qry))
{ echo $r['campo']; }

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] adodb and php5

2003-09-08 Thread Jay Blanchard
[snip]
Does anyone had tested ADODB with php5?
[/snip]

D'oh **slapping forhead** I shouldn't be driving this late on Monday
afternoon.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] adodb and php5

2003-09-08 Thread Gilberto Garcia Jr.
I use adodb cause I need an abstraction layer for database cause the
application can run under mysql, mssql, oracle and pgsql. so i have one
config file that has the parameters for the conection.

this is the reason for me use adodb layer.

now, about ADONewConnection(), this function is from adodb layer.

php.weblogs.com/adodb


- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Gilberto Garcia Jr." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:45 PM
Subject: RE: [PHP] adodb and php5


[snip]
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the
result i got nothing

PConnect('some', 'some', 'some', 'some');
[/snip]

You do not need the ADODB connection if you are using MySQL. Are you
connecting to Access or MS SQL? If you are using MySQL look at
http://www.php.net/mysql_connect . For instance, the function you use
above ADONewConnection() does not exist as a PHP function. Do you
declare the function in adodb.inc.php?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php,up2date and mcrypt

2003-09-08 Thread Steve Buehler
I have a new RedHat Linux v.9 server that gets its php through 
'up2date'.  I want the ability to use mcrypt with php.  I thought that I 
read somewhere a way to do this without having to recompile PHP.  Can 
anybody point me to the right place or explain to me how to do this?

Thanks
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Beta Testers Needed - Free software opportunity

2003-09-08 Thread Matt Palermo
First, I would like to thank all of you who have helped me with my questions
in the past.  I am going to return the favor by giving you an opportunity to
receive a free copy of the latest version of a calendar program, called
TotalCalendar.  SweetPHP.com will be giving out free copies of this software
to the first 5 people who agree to help with the beta testing and half-price
copies to anyone else who helps beta test.  After the beta testing phase is
complete, all beta testers will receive the full, final version at no
additional cost. If you would like to know more about this software, please
visit:



http://sweetphp.com/



There, you will find all the information, as well as a running demo of the
software. If you would like to sign up and become a beta testing, please
contact us at:



[EMAIL PROTECTED]



and we will send you the necessary information needed.  Thanks again to
everyone who has helped me out.



Matt Palermo

[EMAIL PROTECTED]

http://sweetphp.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Beta Testers Needed - Free software opportunity

2003-09-08 Thread Bogdan Stancescu
I think you could adjust your business model a bit, there are quite a 
few GPL projects offering a lot more than what you do, in a better 
groupware environment. For instance you could check out 
http://www.guydavis.ca/opt/ for a demo of a GPL project at least a few 
orders of magnitude above the one you propose.

Just my 2c, obviously,
Bogdan
Matt Palermo wrote:

First, I would like to thank all of you who have helped me with my questions
in the past.  I am going to return the favor by giving you an opportunity to
receive a free copy of the latest version of a calendar program, called
TotalCalendar.  SweetPHP.com will be giving out free copies of this software
to the first 5 people who agree to help with the beta testing and half-price
copies to anyone else who helps beta test.  After the beta testing phase is
complete, all beta testers will receive the full, final version at no
additional cost. If you would like to know more about this software, please
visit:


http://sweetphp.com/



There, you will find all the information, as well as a running demo of the
software. If you would like to sign up and become a beta testing, please
contact us at:


[EMAIL PROTECTED]



and we will send you the necessary information needed.  Thanks again to
everyone who has helped me out.


Matt Palermo

[EMAIL PROTECTED]

http://sweetphp.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Linux Issues

2003-09-08 Thread Stephen Craton
Thanks for the email but I found the reason for it all not working. I have
an ATI Radeon 9800 Pro and it's not supported by the Linux Kernel yet so...

Thanks anyway,
Stephen


- Original Message - 
From: "Viraj Kalinga Abayarathna" <[EMAIL PROTECTED]>
To: "Stephen Craton" <[EMAIL PROTECTED]>
Cc: "andu" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]>
Sent: Sunday, September 07, 2003 11:12 PM
Subject: Re: [PHP] Linux Issues


> Stephen,
> Try Debian Woody (3.0) with latest stable KDE desktop.
> You will be ammazed with the GUI, it's like a Dream.. very fancy
> , smooth and colourfull.
>
> regards
> Viraj
>
> Stephen Craton wrote:
> >
> > Well, I'm wanting one with a really nice GUI and great functionality.
I'll
> > check into Debian and Slackware later today after church. Any other good
> > recomendations?
> >
> > Thanks,
> > Stephen Craton
> > - Original Message -
> > From: "andu" <[EMAIL PROTECTED]>
> > Cc: "PHP List" <[EMAIL PROTECTED]>
> > Sent: Saturday, September 06, 2003 11:02 PM
> > Subject: Re: [PHP] Linux Issues
> >
> > > On Sat, 6 Sep 2003 22:41:29 -0500
> > > "Stephen Craton" <[EMAIL PROTECTED]> wrote:
> > >
> > > > Thanks for the replies.
> > > >
> > > > I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck
(I
> > > > bought the 8.1 CDs a while back)
> > > >
> > > > I've also tried making a floppy disk but still no luck with 8.1. In
9.1,
> > I
> > > > can't get the autorun screen to make the floppy disk.
> > >
> > > Try another distro, I recommend Slackware or Debian. Another option is
to
> > get one
> > > of the distros which run from the cd with the option to copy it to
hard
> > drive like
> > > Knoppix, they have more advanced auto-configuration software.
> > >
> > > >
> > > > Thanks,
> > > > Stephen Craton
> > > >
> > > > - Original Message -
> > > > From: "Dan Anderson" <[EMAIL PROTECTED]>
> > > > To: "Stephen Craton" <[EMAIL PROTECTED]>
> > > > Cc: "PHP List" <[EMAIL PROTECTED]>
> > > > Sent: Saturday, September 06, 2003 10:09 PM
> > > > Subject: Re: [PHP] Linux Issues
> > > >
> > > >
> > > > > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
> > > > >
> > > > > -Dan
> > > > >
> > > > > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > > > > > Hello,
> > > > > >
> > > > > > This isn't really a PHP issue but I have no where else to go to
get
> > help
> > > > really. Hopefully someone here can still help me.
> > > > > >
> > > > > > I am running Windows XP and have decided to install Mandrake
Linux
> > on
> > > > top of it just for the heck of it. So, Friday I downloaded the
latest
> > ISO
> > > > files from an FTP server and today I put in the burnt CDs and it
takes
> > me to
> > > > the boot screen for it. I push enter (as it says to enter the setup)
and
> > it
> > > > takes me to a blank screen and just sits there, doing nothing except
> > > > flashing the Caps Lock and Scroll Lock lights on my keyboard.
> > > > > >
> > > > > > I went to the online manual for Mandrake and it said to add the
text
> > > > "noauto" which I did for the boot sequence. Same error. Any ideas
what's
> > > > going on and how to fix it?
> > > > > >
> > > > > > Thanks,
> > > > > > Stephen Craton
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > > >
> > >
> > >
> > > 
> > > Regards, Andu Novac
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] curl and sent headers

2003-09-08 Thread John Ryan
is there any way of seeing exactly what headers cURL sent in a transfer,
with PHP?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Beta Testers Needed - Free software opportunity

2003-09-08 Thread andu
On Tue, 09 Sep 2003 00:58:07 +0300
Bogdan Stancescu <[EMAIL PROTECTED]> wrote:

> I think you could adjust your business model a bit, there are quite a 
> few GPL projects offering a lot more than what you do, in a better 
> groupware environment. For instance you could check out 
> http://www.guydavis.ca/opt/ for a demo of a GPL project at least a few 
> orders of magnitude above the one you propose.
> 
> Just my 2c, obviously,
> Bogdan

Experience proves that his business model has worked in the past as well as
present (not that I support or practice it), just count the number of people
still buying and using Windows (or OSX for that matter) when Linux has been around
for all these years. And that is just for day to day basic desktop and
development.

> 
> Matt Palermo wrote:
> 
> > First, I would like to thank all of you who have helped me with my questions
> > in the past.  I am going to return the favor by giving you an opportunity to
> > receive a free copy of the latest version of a calendar program, called
> > TotalCalendar.  SweetPHP.com will be giving out free copies of this software
> > to the first 5 people who agree to help with the beta testing and half-price
> > copies to anyone else who helps beta test.  After the beta testing phase is
> > complete, all beta testers will receive the full, final version at no
> > additional cost. If you would like to know more about this software, please
> > visit:
> > 
> > 
> > 
> > http://sweetphp.com/
> > 
> > 
> > 
> > There, you will find all the information, as well as a running demo of the
> > software. If you would like to sign up and become a beta testing, please
> > contact us at:
> > 
> > 
> > 
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> > and we will send you the necessary information needed.  Thanks again to
> > everyone who has helped me out.
> > 
> > 
> > 
> > Matt Palermo
> > 
> > [EMAIL PROTECTED]
> > 
> > http://sweetphp.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] countries,states and cities

2003-09-08 Thread Augusto Cesar Castoldi
hi...

where can I download a database with all countries and
states and cities?

like:
http://www.datingplace.com/servlet/NewRegistration

thanks,

Augusto

___
Desafio AntiZona: participe do jogo de perguntas e respostas que vai
dar um Renault Clio, computadores, câmeras digitais, videogames e muito
mais! www.cade.com.br/antizona

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Beta Testers Needed - Free software opportunity

2003-09-08 Thread Chris Shiflett
--- andu <[EMAIL PROTECTED]> wrote:
> Experience proves that his business model has worked in the past as
> well as present (not that I support or practice it), just count the
> number of people still buying and using Windows (or OSX for that
> matter) when Linux has been around for all these years.

That's not quite the same. Windows didn't have to penetrate the market while
Linux was around as a viable (better?) alternative. At the time, Windows was
the best choice for a desktop OS for many people. Now that it has such a
dominant market position, it no longer has to prove itself to remain on top.
That job is left to Linux, Mac OS X, etc.

In this case, the PHP application being advertised must penetrate an existing
market, which means the competition is heavier. This is why the first responder
was pointing out some of the that competition.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Creating a Calender

2003-09-08 Thread Sn!per
PEAR Date Calc is your friend.

rgds.

--

Quoting "CPT John W. Holmes" <[EMAIL PROTECTED]>:

> From: "Dan Anderson" <[EMAIL PROTECTED]>
> 
> 
> > Does anybody know how to generate calendars easily?  (i.e. print out
> > complete calenders from the current month on)
> 
> I'd check out PEAR or phpclasses.org. I'm sure something is already written,
> but I don't know of any personally.
> 
> ---John Holmes...
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 





---
Sign Up for free Email at http://ureg.home.net.my/
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mail() question

2003-09-08 Thread Ryan A
Hi everyone,
I am trying to create a new newsletter software as the ones i found on
hotscripts were just not good enough or mucho $$ which i dont have :-(

Have finished the basics but need some advise now.
I am using a mysql database instead of text files.

I have a table with the fields "name" and "email", my questions are,
1:is it better to use a for loop and then send each mail?
2:should i first put all the names and addresses into an array?
3:Is it better to send each mail independantly or use BCC? (one mail
blast., will it work?)



Please note that i I intend to add a kind of word merge functionality later
on.
eg:
Dear <::name::>,
thank you for subscribing your email address: <::email::>
etc etc

Am expecting the list to grow to around 5000 or more.

When replying if possible please give program examples or links as am not
very familier with this.

Thanks in advance,
-Ryan





We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Beta Testers Needed - Free software opportunity

2003-09-08 Thread andu
On Mon, 8 Sep 2003 16:48:24 -0700 (PDT)
Chris Shiflett <[EMAIL PROTECTED]> wrote:

> --- andu <[EMAIL PROTECTED]> wrote:
> > Experience proves that his business model has worked in the past as
> > well as present (not that I support or practice it), just count the
> > number of people still buying and using Windows (or OSX for that
> > matter) when Linux has been around for all these years.
> 
> That's not quite the same. Windows didn't have to penetrate the market while
> Linux was around as a viable (better?) alternative. At the time, Windows was
> the best choice for a desktop OS for many people. Now that it has such a
> dominant market position, it no longer has to prove itself to remain on top.
> That job is left to Linux, Mac OS X, etc.
> 
> In this case, the PHP application being advertised must penetrate an existing
> market, which means the competition is heavier. This is why the first responder
> was pointing out some of the that competition.

It is and it isn't the same, people buy because they don't know better, which was
my point. 

> 
> Chris
> 
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Database sessions and file sessions

2003-09-08 Thread CDitty
Can database sessions and file system sessions co-exist on the same 
server.   I have 2 applications that use sessions.  One uses the standard 
php sessions and the other uses sessions that are stored in the 
database.  Neither of these can be changed.

Can anyone offer any advice on this?

Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] tv programme lineup

2003-09-08 Thread Sn!per
nebody know where i can find a script that does something like:

(the admin module)
- add/edit/delete tv programme lineup daily/weekly/monthly
- lineup will include things like programme title, episode, time, synopsis etc

(the public portion)
- can perform search
- calendar
- hilights
- etc

pls advise.


---
Sign Up for free Email at http://ureg.home.net.my/
---

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Database sessions and file sessions

2003-09-08 Thread Chris Shiflett
--- CDitty <[EMAIL PROTECTED]> wrote:
> Can database sessions and file system sessions co-exist on the same 
> server.

Sure, and it is trivial to do unless you are wanting to use the data from both
sessions with the same application, though that is still possible.

If you need to share data, you can just register your own session functions
using session_register() and share the data however you want. In fact, it would
be pretty easy to convert the sessions to use one way or the other in this
manner. You can read the session from both sources and store in whichever
source you are converting to.

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: curl and sent headers

2003-09-08 Thread John Ryan
i found out myself if anyone wants to know...


"John Ryan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> is there any way of seeing exactly what headers cURL sent in a transfer,
> with PHP?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Problem Coding a Tutorial

2003-09-08 Thread Stephen Tiano
Kae,

Excuse my being dense, but I just want to get your meaning with the
lines you added. You're saying to substitute

if($_POST['submit']=='Sign!')

for

if ($submit == "Sign!")

and  to try ('$_POST[name]', ...  (and not $_POST['name'])?

Thank you.

Steve Tiano

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: curl and sent headers

2003-09-08 Thread Chris Shiflett
--- John Ryan <[EMAIL PROTECTED]> wrote:
> is there any way of seeing exactly what headers cURL sent in a
> transfer, with PHP?

--- John Ryan <[EMAIL PROTECTED]> wrote:
> i found out myself if anyone wants to know...

Yes, please. It is always helpful (and courteous) to mention how you solved
your original problem when interacting with this list. This allows you to
contribute back to the list, and ultimately the PHP community. :-)

Even if the answer someone else gave is sufficient, it is nice to quote that
answer and give a quick "that worked" for archival purposes. This way when
someone references the archive seeking the answer to the same question, they
can see which answer worked for you (the person they will likely relate to the
most).

And, though it doesn't apply to you in this case, it is nice to thank the
person who helped you solve a particular problem. The only motivation for
pouring a lot of effort into responding to the questions here is to feel like
you're helping a lot of people. John Holmes comes to mind as a frequent
contributor, as do many others (is there a list?).

Thanks for your help.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: curl and sent headers

2003-09-08 Thread John Ryan
yeah, sure.

well, for archival purposes, i couldnt do it with PHP. the verbose option
didnt work with PHP, CURLOPT_VERBOSE. but it did work on the command line.
so i logged in and re-created my curl transfer on the command line with an
added -v, for verbose. and it gave me back the headers it sent to the site,
i saw my problem straight away, and modified the PHP script.

"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- John Ryan <[EMAIL PROTECTED]> wrote:
> > is there any way of seeing exactly what headers cURL sent in a
> > transfer, with PHP?
>
> --- John Ryan <[EMAIL PROTECTED]> wrote:
> > i found out myself if anyone wants to know...
>
> Yes, please. It is always helpful (and courteous) to mention how you
solved
> your original problem when interacting with this list. This allows you to
> contribute back to the list, and ultimately the PHP community. :-)
>
> Even if the answer someone else gave is sufficient, it is nice to quote
that
> answer and give a quick "that worked" for archival purposes. This way when
> someone references the archive seeking the answer to the same question,
they
> can see which answer worked for you (the person they will likely relate to
the
> most).
>
> And, though it doesn't apply to you in this case, it is nice to thank the
> person who helped you solve a particular problem. The only motivation for
> pouring a lot of effort into responding to the questions here is to feel
like
> you're helping a lot of people. John Holmes comes to mind as a frequent
> contributor, as do many others (is there a list?).
>
> Thanks for your help.
>
> Chris
>
> =
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Single Quotes vs Double Quotes

2003-09-08 Thread micro brew
Hi everyone,

Could somebody please explain to me the difference
between single quotes and double quotes in PHP.  It
seems like they can be used interchangeably a lot in
PHP but not always. For example:

This works:
header('Location: http://somedomain.com')

This does not work:
header('Location: $url')

This works:
header("Location: $url")


Why???  Sorry if this has been asked before, but I
didn't find a suitable answer in the archives.  TIA.

Mike

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



php-general Digest 9 Sep 2003 04:03:37 -0000 Issue 2286

2003-09-08 Thread php-general-digest-help

php-general Digest 9 Sep 2003 04:03:37 - Issue 2286

Topics (messages 161999 through 162033):

Re: Passing query parameter which has value "###"
161999 by: murugesan

Re: Creating a Calender
162000 by: Curt Zirzow
162023 by: Sn!per

upload problems
162001 by: Doug Parker
162002 by: Marek Kilimajer
162003 by: Dan Anderson

Re: Dynamic Form checking
162004 by: Dan Anderson

site with linux binaries??
162005 by: John Ryan

Simple Selection Box
162006 by: Scott Miller
162007 by: Jay Blanchard
162008 by: Scott Miller

Re: Try/Catch
162009 by: Jay Blanchard

adodb and php5
162010 by: Gilberto Garcia Jr.
162011 by: Jay Blanchard
162012 by: CPT John W. Holmes
162013 by: Jay Blanchard
162014 by: Gilberto Garcia Jr.

php,up2date and mcrypt
162015 by: Steve Buehler

Beta Testers Needed - Free software opportunity
162016 by: Matt Palermo
162017 by: Bogdan Stancescu
162020 by: andu
162022 by: Chris Shiflett
162025 by: andu

Re: Linux Issues
162018 by: Stephen Craton

curl and sent headers
162019 by: John Ryan
162029 by: John Ryan
162031 by: Chris Shiflett
162032 by: John Ryan

countries,states and cities
162021 by: Augusto Cesar Castoldi

Mail() question
162024 by: Ryan A

Database sessions and file sessions
162026 by: CDitty
162028 by: Chris Shiflett

tv programme lineup
162027 by: Sn!per

Re: Problem Coding a Tutorial
162030 by: Stephen Tiano

Single Quotes vs Double Quotes
162033 by: micro brew

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Thanks for the reply.It is working

-Murugesan
- Original Message -
From: "Chris Hayes" <[EMAIL PROTECTED]>
To: "murugesan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:15 PM
Subject: Re: [PHP] Passing query parameter which has value "###"


> At 13:04 8-9-03, you wrote:
> >I passed value
> >main.php?name=$name&id=$id&id1=$id1  to next page
> >where $id has value "###"
> >In the next page I was not able to get the $id and $id1 values
> >and I am able to get the two values $id1 and $name when I used
> >main.php?name=$name&id1=$id1
> >What might be the problem?
>
>
> The # in a url is used for the in-page anchors, e.g. if you have an anchor
> in your page , then a url such as
page.html#chapter2
> will jump to that location in the page. So the part after the # is cut off
> by the browser, i suppose.
>
>
> Try this:
>  echo '';
> ?>
> This changes the # to a code (% followed by some number)
>
> (check urlencode in the manual)
>
--- End Message ---
--- Begin Message ---
* Thus wrote Dave Dash ([EMAIL PROTECTED]):
> 
> begin 666 cal.css
> M+F-A;&5N9&%R('L*"6)O--- End Message ---
--- Begin Message ---
PEAR Date Calc is your friend.

rgds.

--

Quoting "CPT John W. Holmes" <[EMAIL PROTECTED]>:

> From: "Dan Anderson" <[EMAIL PROTECTED]>
> 
> 
> > Does anybody know how to generate calendars easily?  (i.e. print out
> > complete calenders from the current month on)
> 
> I'd check out PEAR or phpclasses.org. I'm sure something is already written,
> but I don't know of any personally.
> 
> ---John Holmes...
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 





---
Sign Up for free Email at http://ureg.home.net.my/
---
--- End Message ---
--- Begin Message ---
I'm trying to do some uploading on my server, and I'm not getting any value
for my "tmp" upload setting - meaning this code:

$source = $_FILES['cat1_thumb']['tmp_name'];
echo $source;

returns nothing.   The form is fine - meaning that the text input name is
correct and I am indeed selecting a file.  I realized that our
upload_tmp_dir setting was not set, so I had the admin set it, but it still
returns nothing.  Is there another setting I should check?

Thanks

--




http://www.phreshdesign.com
--- End Message ---
--- Begin Message ---
Does the form contain
?
Doug Parker wrote:
I'm trying to do some uploading on my server, and I'm not getting any value
for my "tmp" upload setting - meaning this code:
$source = $_FILES['cat1_thumb']['tmp_name'];
echo $source;
returns nothing.   The form is fine - meaning that the text input name is
correct and I am indeed selecting a file.  I realized that our
upload_tmp_dir setting was not set, so I had the admin set it, but it still
returns nothing.  Is there another setting I should check?
Thanks

--




Re: [PHP] Single Quotes vs Double Quotes

2003-09-08 Thread Tom Rogers
Hi,

Tuesday, September 9, 2003, 2:03:34 PM, you wrote:
mb> Hi everyone,

mb> Could somebody please explain to me the difference
mb> between single quotes and double quotes in PHP.  It
mb> seems like they can be used interchangeably a lot in
mb> PHP but not always. For example:

mb> This works:
mb> header('Location: http://somedomain.com')

mb> This does not work:
mb> header('Location: $url')

mb> This works:
mb> header("Location: $url")


mb> Why???  Sorry if this has been asked before, but I
mb> didn't find a suitable answer in the archives.  TIA.

mb> Mike

mb> __
mb> Do you Yahoo!?
mb> Yahoo! SiteBuilder - Free, easy-to-use web site design software
mb> http://sitebuilder.yahoo.com

PHP will not parse single quoted strings but will do for double quoted
strings. So if you don't need it to do $val substitution or "\n" type
stuff use single quotes.
You can always use the dot operator (.) to mix quotes and variables like this:

echo ''."\n";

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Single Quotes vs Double Quotes

2003-09-08 Thread Chris Shiflett
--- micro brew <[EMAIL PROTECTED]> wrote:
> Could somebody please explain to me the difference
> between single quotes and double quotes in PHP.

Strings within single quotes are not evaluated. String within double quotes
are. Try this example:



If there is nothing to be evaluated (such as a variable), as is the case in the
last two examples, you will notice no difference.

Also, because single quotes within a string must be escaped when single quotes
are the delimiter, and vice versa, it is sometimes convenient to choose based
on that alone. For example:

$sql = "select foo from bar where blah='whatever'";

instead of:

$sql = 'select foo from bar where blah=\'whatever\'';

or:

echo 'http://www.php.net/";>PHP';

instead of:

echo "http://www.php.net/\";>PHP";

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SSL Client in PHP

2003-09-08 Thread Alvar Saenz Otero
Hi,

I found the following e-mail in a PHP Development Archive, and I have 
exactly the same questions... ufnortunately there was no answer in the 
archive, only the pointer to e-mail this list.  If you can help me, it 
would be greatly appreciated!

Alvar


To: php-dev at lists dot php dot net
From: "LUNAR" <office at lunar dot com dot pl>
Date: Thu, 28 Mar 2002 10:58:14 +0100
list-help: 
<mailto:[EMAIL PROTECTED]>
list-post: <mailto:[EMAIL PROTECTED]>
list-unsubscribe: 
<mailto:[EMAIL PROTECTED]>



Hi,

Can anyone tell me how can I check the following values in PHP? The
following is a PERL transcription:
unless ( $ENV{'SSL_CLIENT_VERIFY'}
and ($ENV{'SSL_CLIENT_VERIFY'} eq 'SUCCESS')
and ($ENV{'SSL_CLIENT_S_DN_O'} eq 'TestCompany')) {
and ($ENV{'SSL_CLIENT_S_DN_L'} eq 'WARSAW')
and ($ENV{'SSL_CLIENT_S_DN_CN'} eq 'abc.def..pl')
and ($ENV{'SSL_CLIENT_S_DN_C'} eq 'PL')
and ($ENV{'SSL_CLIENT_I_DN_O'} eq 'Thawte Consulting cc')) {
and ($ENV{'SSL_CLIENT_I_DN_CN'} eq 'Thawte Server CA')) {
and ($ENV{'SSL_CLIENT_I_DN_C'} eq 'ZA')
exit;
If I chjeck the $_GLOBALS variable array in PHP I only get the values of
SSL_SERVER. $ENV does not have this values.
Thanks,
Artur Zas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Single Quotes vs Double Quotes

2003-09-08 Thread Rodney Green
Try this: http://www.faqts.com/knowledge_base/view.phtml/aid/208


- Original Message - 
From: "micro brew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 09, 2003 12:03 AM
Subject: [PHP] Single Quotes vs Double Quotes


> Hi everyone,
> 
> Could somebody please explain to me the difference
> between single quotes and double quotes in PHP.  It
> seems like they can be used interchangeably a lot in
> PHP but not always. For example:
> 
> This works:
> header('Location: http://somedomain.com')
> 
> This does not work:
> header('Location: $url')
> 
> This works:
> header("Location: $url")
> 
> 
> Why???  Sorry if this has been asked before, but I
> didn't find a suitable answer in the archives.  TIA.
> 
> Mike
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Single Quotes vs Double Quotes

2003-09-08 Thread Raditha Dissanayake
Hi,
the $ sign inside single quotes is just a dollar sign. When you place it 
inside double quotes it's the start of a variable name.
This is because what is inside single quotes are unparsed while whats 
inside double quotes are parsed. For this reasong if you are having to 
print out lengthy string literals you should use single quotes. else you 
can always safely use doubles.



micro brew wrote:

Hi everyone,

Could somebody please explain to me the difference
between single quotes and double quotes in PHP.  It
seems like they can be used interchangeably a lot in
PHP but not always. For example:
This works:
header('Location: http://somedomain.com')
This does not work:
header('Location: $url')
This works:
header("Location: $url")
Why???  Sorry if this has been asked before, but I
didn't find a suitable answer in the archives.  TIA.
Mike

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Question about MySQL 4.0

2003-09-08 Thread T. Hart
I'm just curious that if anything special has to be
done to PHP (besides recompiling) after upgrading to
MySQL 4.0. I noticed that they are removing C API
commands like mysql_connect() and was unsure if these
are the same ones that PHP uses. Any help would be
appreciated. Thanks.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Installing php with gd what a pain!

2003-09-08 Thread Dhaval Desai
Hello Guys,

I am trying to install php 4.3.2 with gd support. I have already installed 
zlib and jpeg-6b. My configure line options are as below:

./configure --with-gd --with-jpeg-dir=/usr/lib
it doesn't work.
I tried
./configure --with-gd --with-jpeg-dir=/usr/local/bin
it still doesn't work even tough all the cjpeg and djpeg files are there...


it says libjpeg not found for both

Could anybody tell me what could be wrong?

-Dhaval

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] site with linux binaries??

2003-09-08 Thread John Ryan
hi,

i wanna upgrade php, but i dont have, and can never have root access on my
server, plus no gcc or anything, so is there any site with binaries of php
for linux-x86, with pretty much, all extras and modules!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php