Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
hi just got a little problem

Code:
<input type="text" name="poster" value='<?php print ("$usrname") ?>' disabled="disabled" />

ok so what it dose is takes the username of the person posting a comment and adds it to the forum in a uneditable way. However when it goes to upload.php it just dosnt take this, if i change it to
Code:
value="hello"
then it uploads that just fine into the database but not if i use php print. The username dose show up on the forum it just dosnt get uploaded to the database and causes a error.
 
Probably because you are using single quotes around the "value" HTML string. Try this instead:

Code:
<input type="text" name="poster" value="<?php print $usrname ?>" disabled="disabled" />
 
i get the following error

Code:
Notice: Undefined index: poster in /home/fhlinux168/d/dev.cossycomforts.com/user/htdocs/includes-functions/uploader.php on line 11
uploaded
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.