Databases :: MySql :: problem about inseting data to mysql via PHP web |
|||
| By: Squibi |
Date: 08/01/2003 00:00:00 |
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 | 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 | 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 | 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 | Type : Comment |
|
| Hi VGR, Thank you soooooooooooooooooo much! I made it. Admire you ^_^ |
|||
| By: VGR | Date: 09/01/2003 20:49:00 | Type : Comment |
|
| not useful, nor merited ;-) I did the same error before you, that's all ;-) |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








