visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: problem about inseting data to mysql via PHP web


By: Squibi U.S.A.  Date: 08/01/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
I want to insert data to mysql table through php webpage. but when I type the data and click the submit button, error occured as follows:
"Notice: Undefined variable: UserName in c:\inetpub\wwwroot\add2tbl.php on line 5
No UserName Entered. Please go back and reenter UserName"

Help me out. Thank you so much!
By: VGR Date: 09/01/2003 20:19:00 English  Type : Comment
As Cyrano de Bergerac would have said, it's a bit SHORT to help you 8-))))))))))))))))))


I suspect :
-either UserName passed by a FORM and register_globals is off so the receiving script fails reading the $UserName value, it should be _SERVER[] or something like that

-either userName is an upload field and then you messed completely the upload process
By: Squibi Date: 09/01/2003 20:26:00 English  Type : Comment
Thank you. I think maybe because register_globals is off. But how to solve it? Could you tell me about it? Thank you so much!
By: VGR Date: 09/01/2003 20:36:00 English  Type : Answer
well, YOU know if you are using an HTML FORM that sends out the variable $UserName to the next PHP page ;-)

not me ;-)

I can only guess...

***if*** you want a fast solution, edit php.ini and set register_globals to "on"

***if*** you want to follow the horde of well-thinking people, then don't. But prepare to modify your code to use the new "super_globals" arrays, soooo marvelous ;-))
By: Squibi Date: 09/01/2003 20:40:00 English  Type : Comment
Hi VGR, Thank you soooooooooooooooooo much! I made it. Admire you ^_^
By: VGR Date: 09/01/2003 20:49:00 English  Type : Comment
not useful, nor merited ;-)
I did the same error before you, that's all ;-)

Do register to be able to answer

EContact
browser fav
page generated in 348.524090 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page