开发者

Updating sql data through PHP

Good day!

I am having a problem in showing the data that I need to Update.

For example: I have a field - NAME. And user input "John Travolta" on it and enter to save it in SQL. Then to update it, he will click the update an开发者_开发百科d a textbox will appear with the name "John Travolta" with it.

The problem is I am only getting "John" and the "Travolta" does not appear on the text box.

My code is as follows:

<input name="event" type="text" id="event" size="69" value=<?php print stripslashes($row_array['event'])?>>

What can i do in order for the whole name to appear in the textbox? Thank you in advance.


You need to put quotes before and after the PHP line so HTML can parse it as a string. otherwise you will end with value=John Travolta when you want value="John Travolta"


Use that code:

<input name="event" type="text" id="event" size="69" value="<?php print stripslashes($row_array['event']);?>">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜