Jump to content

hidden input field type doesnt store complete value


devilinc

Recommended Posts

hidden input field type doesnt display the full value i get from table, say if it is a first name and last name i get only the first name. here is my input field

echo "<input type=hidden name=proid value=$result_row[project_id]></include>";
		echo "<input type=text value=$result_row[project_name] readonly></include>";

 

my sql query returns the full name but when i input into the text field it returns an incomplete project name like say if it is fans of soccer, i just get the value "fans" in my display..... :-[

Link to comment
Share on other sites

Attributes need quotes around there values to be valid.

 

Was just about to say that.

Instead of using:

 

echo "<input type=text value=$result_row[project_name] readonly></include>";

 

use:

 

echo "<input type="text" value="'.$result_row['project_name'].'" readonly></include>";

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.