0

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 and 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.

3
  • How does the name look in the database? Commented Apr 23, 2011 at 16:17
  • Did you check the database to make sure that the data is correct? Could you provide the code on how you're inserting/getting your data? Commented Apr 23, 2011 at 16:18
  • Also check your database NAME field length. Commented Apr 23, 2011 at 16:25

2 Answers 2

5

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"

Sign up to request clarification or add additional context in comments.

Comments

1

Use that code:

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.