[PHP] session var not carrying
unable to get these session variable to be used on thanks.php page Contact.php First Name: Last Name: E-mail Address: Ask a Question .Thanks.php. $session_start();] $from = $FirstName . $Lastname; _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] concatenate vars?
I need to combine two variables which are set to two form field values and will be put into $from of mail(). Should it be $from = "$varOne . $varTwo" ? also a way to make if(.something) (eregi("blah", $one)("blah2", $two)("blah3", $three));
Re: [PHP] concatenate vars?
Thanks, do you know if making multiple statements to eregi in line 3 is possible? 1. if(...something...) 2.{ 3. (eregi("stuff1", $one)("stuff2", $two)("stuff3", $three)) ? 4. do something : do something else; _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail prob
I'm using a remote host, and when I call mail() with all the var's pulling values from form fields, it still shows as nobody in from header. Is this a server situation? Theyre using php4 support and they claim its that I'm not using appropriate variables in the function. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail prob
so there is no way to pull this variable from an email form field? > From: "W.D." <[EMAIL PROTECTED]> > > > I'm using a remote host, and when I call mail() with all the var's pulling > > values from form fields, it still shows as nobody in from header. Is this > a > > server situation? Theyre using php4 support and they claim its that I'm > not > > using appropriate variables in the function. > > > > > > > You have to set the From header manually: > > > $to = "[EMAIL PROTECTED]"; > $from = "[EMAIL PROTECTED]"; > $subject = "Blah"; > $body = "Lorem ipsum dolor sit amet."; > > mail($to, $subject, $body, "From: $from"); > ?> > > > http://www.php.net/manual/en/function.mail.php > > > Regards > > Simon Garner _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail prob
well this is actually what I did tho, I used an $email var and set it too $from which I used mail()and it still came out as nobody > From: "W.D." <[EMAIL PROTECTED]> > > > so there is no way to pull this variable from an email form field? > > > > > Eh? Of course, $from can be set by a form field if you want. Or a database, > or any way you can set a variable. Then pass it to mail(), per my last > message. > > > > > > > > > > > From: "W.D." <[EMAIL PROTECTED]> > > > > > > > I'm using a remote host, and when I call mail() with all the var's > > pulling > > > > values from form fields, it still shows as nobody in from header. Is > > this > > > a > > > > server situation? Theyre using php4 support and they claim its that > I'm > > > not > > > > using appropriate variables in the function. > > > > > > > > > > > > > > > > > You have to set the From header manually: > > > > > > > > > > > $to = "[EMAIL PROTECTED]"; > > > $from = "[EMAIL PROTECTED]"; > > > $subject = "Blah"; > > > $body = "Lorem ipsum dolor sit amet."; > > > > > > mail($to, $subject, $body, "From: $from"); > > > ?> > > > > > > > > > http://www.php.net/manual/en/function.mail.php > > > > > > > > > Regards > > > > > > Simon Garner > > > _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail prob
First Name: Last Name: E-mail Address: Ask a Question > From: "W.D." <[EMAIL PROTECTED]> > > > well this is actually what I did tho, I used an $email var and set it too > > $from which I used mail()and it still came out as nobody > > > > > Can you show us the PHP code you're using please. > > Ta > > > > > > > > From: "W.D." <[EMAIL PROTECTED]> > > > > > > > so there is no way to pull this variable from an email form field? > > > > > > > > > > > > > Eh? Of course, $from can be set by a form field if you want. Or a > > database, > > > or any way you can set a variable. Then pass it to mail(), per my last > > > message. > > > > > > > > > > > > > > > > > > > > > > > > > From: "W.D." <[EMAIL PROTECTED]> > > > > > > > > > > > I'm using a remote host, and when I call mail() with all the var's > > > > pulling > > > > > > values from form fields, it still shows as nobody in from header. > Is > > > > this > > > > > a > > > > > > server situation? Theyre using php4 support and they claim its > that > > > I'm > > > > > not > > > > > > using appropriate variables in the function. > > > > > > > > > > > > > > > > > > > > > > > > > > > You have to set the From header manually: > > > > > > > > > > > > > > > > > > > $to = "[EMAIL PROTECTED]"; > > > > > $from = "[EMAIL PROTECTED]"; > > > > > $subject = "Blah"; > > > > > $body = "Lorem ipsum dolor sit amet."; > > > > > > > > > > mail($to, $subject, $body, "From: $from"); > > > > > ?> > > > > > > > > > > > > > > > http://www.php.net/manual/en/function.mail.php > > > > > > > > > > > > > > > Regards > > > > > > > > > > Simon Garner > > > > > > > > > > > > > _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mail() question
I want to send a .txt file back to the sender when a form is filled out, sort of like an autoresponder. I have one mail() to send info from form to me, is the only way to send out a file back to the sender by using a second mail()? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail() question
just the info in the .txt file > did you want to actually send the .txt file or just the info in the .txt > file?? > > -Original Message----- > From: W.D. [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 28, 2001 10:19 AM > To: [EMAIL PROTECTED] > Subject: [PHP] mail() question > > > I want to send a .txt file back to the sender when a form is filled out, > sort of like an autoresponder. I have one mail() to send info from form to > me, is the only way to send out a file back to the sender by using a second > mail()? > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help with branching eregi
this script isnt working like I want itmainly I need multiple eregi() to check fields http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); } session_start();?> _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] whats happening with form
I use session variables to retrieve values from form fields and send by mail(). Problem is upon testing after I fill out form once and send, then go back and test again with different info it sends the info from the first time. Whats wrong? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] whats happening with form
Do I have to call each variable like session_unset(var1, var2, var3); and session_destroy(var1, var2, var3)? > > > I use session variables to retrieve values from form fields and send by > mail(). Problem is upon testing after I fill out form once and send, then go > back and test again with different info it sends the info from the first > time. Whats wrong? > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Please help with multi eregi
I have this following if statement.http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); (eregi("^[a-z]$", $FirstName))?header("Location: http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); (eregi("^[a-z]$", $LastName))?header("Location: http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); ?> Ive tried several ways but cant get it too work right. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] validating fields
I dont know how to do this, but Ive tried several things with no success. I need to validate several form fields and here is the script I'm working with... http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); } ;?> I need to check at least two more fields, possibly 3 but I keep getting errors when trying to loop through a bunch of if statements. The above works fine but I need to check eregi() against more strings from fields which then redirects as shown above. Anyone? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] validating fields
Actually I tried a variation of what you gave me before and it didnt work. I couldnt get yours to validate thanks. heres what I used This is directly after the form using the registered vars $Email, $FirstName, $LastName. So I dunno whats wrong.. > From: "W.D." <[EMAIL PROTECTED]> > > > I dont know how to do this, but Ive tried several things with no success. > I > > need to validate several form fields and here is the script I'm working > > with... > > > > > { > > (eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $Email))? > > header("Location: http://www.site.com/thanks.php"): > > header("Location: http://www.site.com/error.php"); > > } > > ;?> > > > > I need to check at least two more fields, possibly 3 but I keep getting > > errors when trying to loop through a bunch of if statements. The above > works > > fine but I need to check eregi() against more strings from fields which > then > > redirects as shown above. Anyone? > > > > > if (getenv("REQUEST_METHOD") == "POST") > { > if ( > eregi("pattern1", $field1) > && eregi("pattern2", $field2) > && eregi("pattern3", $field3) > ) > { > echo "thanks"; > } > else > { > echo "error!"; > } > } > ?> > > > Or if you want better error reporting: > > > if (getenv("REQUEST_METHOD") == "POST") > { > $errors = array(); > > if (!eregi("pattern1", $field1)) > { > $errors[] = "field1 is not right"; > } > if (!eregi("pattern2", $field2)) > { > $errors[] = "field2 is not right"; > } > if (!eregi("pattern3", $field3)) > { > $errors[] = "field3 is not right"; > } > > if (count($errors) > 0) > { > echo "Sorry, " . count($errors) . " errors occurred, please try > again.\n"; > foreach ($errors as $err) > { > echo "$err\n"; > } > echo ""; > } > } > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] login without database
You would probably check against an encrypted file though for more security. > you could use flat files, another words store the user information in a text > file like below: > username|pass|email > bob|fgffsdg|[EMAIL PROTECTED] > foo|bar|[EMAIL PROTECTED] > > > and then just read and write the file with PHP. > > Jon > > > - Original Message - > From: "Jan Grafström" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, March 30, 2001 11:15 AM > Subject: [PHP] login without database > > > > Hi! > > Can I use php to make a login system for users? I don´t have a databas > > on my server. I only want to have a few users. When I send variables to > > php the string is always cached by IE5.5 and it´s very easy to se the > > username and password if you look i cache. Is there a way to get this > > done only on the server? > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Will this work?
I'm still new to php, just wanted to check to make sure this will work ok. Thanks "> First Name: Last Name: E-mail Address: http://www.SITE.com/error.php"); exit; } else { header("Location: http://www.SITE.com/thanks.php"); exit; } ?> _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Will this work?
Ok, I removed the (" ") from action and it worked, but it doesnt validate, just sends to thanks page regardless of whether the fields are filled or not. Am I mistaking IsSet for handling that? > Hi, > > > "> > > First Name: > > Last Name: > > E-mail Address: > > > > > > The form should work. > > > > if(!IsSet($FirstName, $LastName, $Email)) > > { > > header("Location: http://www.SITE.com/error.php"); > > exit; > > } > > else > > { > > header("Location: > > http://www.SITE.com/thanks.php"); > > exit; > > } > > ?> > > This won't work. I assume that this code is included on the page with the > form above. First, the header() function must be called before any output > is sent to the browser or it will throw an error and stop. The second > problem is that the first time a user comes to this page, it will throw then > to the error page because the vars won't be set. Try this: > > if($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST") > { > (!isset($Email)||!isset($FirstName)||!isset($LastName))? > header("Location: http://www.SITE.com/error.php"): > header("Location: http://www.SITE.com/thanks.php"); > } > ?> > > Then put your form below it. This will work unless you do a form post to > this page from another page in which case it will throw you to the error > page. > > Jason _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ereg match problem
I'm testing email address, but want to test not only characters but the @ sign and for .com, .net, .org, or .tv. How would I include all of these? $test = $email if( ereg("[a-zA-Z0-9]+)\@([a-zA-Z0-9]+)\.comhow would I include the rest? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] start-condition stack underflow
Fatal error: start-condition stack underflow Have not seen this error in 4 years of programming PHP. Came up in looping SMTP socket test. Anyone knows what this means? Thanks Buiten Westen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php