[PHP] ptting the variable inside the input
This does not work echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; Ta, R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ptting the variable inside the input
[snip] echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; [/snip] echo trtdinput name=\title\ type=\text\ value=\.$title.\ //td; You have to concatenate the value $title into the string -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ptting the variable inside the input
Hulf wrote: This does not work echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; In what way does it not work and you do realise you're outputting $title on its own as well as the table row and input. This will appear above the table in most browsers since it's not actually part of the table. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ptting the variable inside the input
Hulf wrote: This does not work echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; In what way does it not work and you do realise you're outputting $title on its own as well as the table row and input. This will appear above the table in most browsers since it's not actually part of the table. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ptting the variable inside the input
[snip] [snip] echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; [/snip] echo trtdinput name=\title\ type=\text\ value=\.$title.\ //td; You have to concatenate the value $title into the string [/snip] Actually don't have to do that, it was just one of the things that I thought of right off the top of my head. What is the result of echo $title=$row['title']; ? Actually, that is bad form, why do the transfer? echo trtdinput name=\title\ type=\text\ value=\.$row['title'].\ //td; If you must do the re-assignment; $title = $row['title']; echo $title; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ptting the variable inside the input
From: Hulf [EMAIL PROTECTED] This does not work echo $title=$row['title']; echo trtdinput name=\title\ type=\text\ value=\$title\ //td; Ta, R. I'll pull a Johnny Carson divining moment and say: Did you need the first 'echo'? Does $title need to be set? Try: $title=$row['title']; You missed a double quote after your backslash; the attempt to escape one after 'text' and before 'value': echo trtdinput name=\title\ type=\text\ value=\$title\ //td; Or perhaps use single quotes and don't set $title: echo 'trtdinput name=title type=text value=' . $row['title'] . ' //td'; But I like that 4 step approach to addressing a problem and posting a question. Maybe you are using a wireless keyboard which needs batteries or charging or needs to be placed closer to the receiver? You also missed a character in your subject. Unless you just type lazily. _ Now you can see troubleĀ before he arrives http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_protection_0507 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ptting the variable inside the input
Hi! You don't have to end your string when placing an array value. {} will tell the parser to interpret the text between as a variable. Try: echo trtdinput name=\title\ type=\text\ value=\{$row['title']}\ //td; Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php