Page 1 of 1
parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_
Posted: Tue Aug 15, 2006 11:55 pm
by shiranwas
Everah | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
prase error popup for tis coding what is the problam
Code: Select all
echo ' <input type="text" name="textfield" value=" <? print $a ?>">';
shiran thanks
Everah | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Posted: Tue Aug 15, 2006 11:58 pm
by feyd
more code please... and make sure you put them in
Posted: Wed Aug 16, 2006 12:07 am
by RobertGonzalez
Your syntax is wonky. Try this...
Code: Select all
echo '<input type="text" name="textfield" value="' . $a .'">';
Re: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_
Posted: Wed Aug 16, 2006 12:07 am
by s.dot
shiranwas wrote:Everah | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
prase error popup for tis coding what is the problam
Code: Select all
echo ' <input type="text" name="textfield" value=" <? print $a ?>">';
shiran thanks
Everah | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color][/quote]
Since you're already echo'ing it, I'll assume you're already inside a php code block
Code: Select all
echo ' <input type="text" name="textfield" value="'.$a.'">';
would work
[edit] nice one everah =]
Posted: Wed Aug 16, 2006 12:07 am
by shiranwas
i was able to correct the parse error , there was a ; missing but yet the value of $a won't print
can u help me please.
Code: Select all
$_SESSION['userlevel'] =$row[levelid];
$a=$_SESSION['userlevel'];
echo $a; //this print the value of the $a
//but this part not working
echo ' <input type="text" name="textfield" value=" <? print $a ?>">';
shiran
Posted: Wed Aug 16, 2006 12:12 am
by RobertGonzalez
$a gets its value from $_SESSION['userlevel'], which gets its value from $row['levelid'] (note the use of quotes). Where is $row getting its value from?
And again, to reiterate, this...
Code: Select all
echo ' <input type="text" name="textfield" value=" <? print $a ?>">';
WILL NOT WORK. Change it to...
Code: Select all
echo '<input type="text" name="textfield" value="' . $a . '">';
Posted: Wed Aug 16, 2006 12:31 am
by shiranwas
thanks alot for your help
its woked and could send me some tutorial or links about using '' ""
thanbks again
Posted: Wed Aug 16, 2006 7:57 am
by feyd