For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > October 2004 > Re: [PHP-WIN] Post method not working









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-WIN] Post method not working
Sudeep

2004-10-21, 8:56 am

Hi brian,

You have an error in line: print "You chose a $borderStyle border";

It should be like this:

print "You chose".$_GET["borderStyle"]."border";

B'cause $_GET["borderStyle"] is the correct way to capture things that are sent thru url.

And for POST variable it should be $_POST["borderStyle"]

Try it....

....SuDeEp...

Brian <brian.armstrong@intela.net> wrote:
OK, I'm new to php, so be gentle :)

I have just installed PHP 5.0.2 on Windows XP Pro\IIS 5

I am learning PHP with one of those step by step books, and I have run into
an issue with forms. They don't seem to be getting the variable I am
passing.

This code works:

$testvar = "this is a test";
print $testvar;
?>

But this does not:

print "You chose a $borderStyle border";
?>

Even when I put 'filename.php?borderStyle=test' in the browser, with the
entire url of course, it still only shows the print text, but not the
variable.

Any thoughts? I have also verified that the mappings are set with .php with
verbs set to all or even GET, POST.

Thanks for any help

Belgarath the Ancient One

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


________________________________________
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com