For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > November 2004 > $username=$_REQUEST vs .$_POST["userName"]?









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 $username=$_REQUEST vs .$_POST["userName"]?
Aomarlow

2004-11-25, 3:56 am

Hi everyone,

"Assuming you have not omitted any of the code for script 2:
> You need to have a get the posted value at the start of script 2 i.e.
> $username = $_REQUEST['userName'];

vs.
> ". $_POST["userName"] ."</h3>";
> Mike

And assuming both Armando and Mikes answers work which method is
the more correct?"

Interestingly enough, in this particular situation, it was neither Mike's answer nor Armando's that did the trick for me, although I certainly tried them both, and have kept both answers in my PHP Tutorials folder for future reference, and I appreciate th
e help of both very much. But instead, it seems that Trevor has the correct answer to my particular problem. He suggested that my web server might not be configured correctly, and at least with my very limited beginner's knowledge of PHP, since neither
Armando's suggestion or Mike's worked, I'm assuming that Trevor must be correct.

I have been following the advice from a book called, "PHP 5/MySQL Programming for the Absolute Beginner." I'm still reading this book yet, so I hate to pronounce judgment, but from what I've seen regarding the issue of configuration, this book might not
be entirely correct. At least, not for an absolute beginner. [And please don't forget that I am an absolute beginner with PHP, so whatever I say about this book is probably not correct either--I'm just going by my experience with the book and with the
advice I've gotten from others on the list]. I followed the configuration instructions in the book to the best of my abilities, but in the end, I had to re-do everything, and instead, follow the advice of someone that helped me from a list, just like you
folks. Also like you, he was very friendly and helpful, and he guided me through the mess that was created when I followed the instructions in the book regarding configuration. Anyway, the instructions in the book didn't work for
me, but the advice I got did work, as far as the initial problems I was having with getting the phpInfo() command to work.

I'm including my comments about the book that I mentioned above only because the title says that it's for absolute beginners. And I just think that it might help someone else who is an absolute beginner like me to know that this might not be the best boo
k for a real absolute beginner. Then again, everyone brings into a book the sum total of their life's experience, so anybody else could get something very different out of the same book. I plan on finishing this book, and I'm glad that I bought it, but
as you can see, I've had to depend heavily on this list (and the apache list) to work out the kinks that Iv'e run into. So I guess, this is kind of a review for other absolute beginners out there, who are also trying to figure their way through setting u
p PHP, MySQL and Apache. But, all else said, if I had to decide whether or not to purchase this book over again, I would still buy it. So this is a mixed review. The book has lot's of code samples and is well written. But the
book does say that getting PHP, MySQL and apache set up is a real "headache," and suggests that the reader should get someone else to do it for them. A statement like that in a how-to book, seems kind of weird to me.

But thank you for your help, everyone. I really do appreciate it. Once I've finished going through the configuration process again, I'll add the code that both Armando and Mike gave me, back into the program again, then I'll let you know!

Thanks again,
Anthony





---------------------------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
Sponsored Links







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

Copyright 2008 codecomments.com