Freedom-n-Democrazy Posted October 3, 2011 Share Posted October 3, 2011 I am having trouble implementing PHP inside a HTML attribute. Every time I try to fix it, I seem to make things worse. Can someone please help me: <INPUT name="id" type="text" value=""<?php echo "$row['id']"; ?>""> Link to comment https://forums.phpfreaks.com/topic/248316-implementing-php-inside-a-html-attribute/ Share on other sites More sharing options...
Buddski Posted October 3, 2011 Share Posted October 3, 2011 Your PHP code isnt inside the value attribute. You can also remove the quotes from around the $row['id'] Link to comment https://forums.phpfreaks.com/topic/248316-implementing-php-inside-a-html-attribute/#findComment-1275124 Share on other sites More sharing options...
trq Posted October 3, 2011 Share Posted October 3, 2011 <input name="id" type="text" value="<?php echo $row['id']; ?>"> Link to comment https://forums.phpfreaks.com/topic/248316-implementing-php-inside-a-html-attribute/#findComment-1275125 Share on other sites More sharing options...
Freedom-n-Democrazy Posted October 3, 2011 Author Share Posted October 3, 2011 Thanks Buddski about the no quote need. Thanks thorpe the code worked. OMG man why am I so fuckin dumb! I think non-computer related stress is getting to me. I think its time to close off this bull shit Facebook account too... TOTAL unproductively! Link to comment https://forums.phpfreaks.com/topic/248316-implementing-php-inside-a-html-attribute/#findComment-1275129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.