Page 1 of 1

value not shown

Posted: Mon Jul 16, 2007 9:20 am
by m2babaey
Hi
I query the database to retreive article title, text, order and section and display a form to edit it.
I'm trying to set the default value of the form fields as the current database records but they ( values) are not shown. here is the form code:
where I an wrong?

Code: Select all

<form method="POST" action="--WEBBOT-SELF--">
	<p align="left">&nbsp;title&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; <input type="text" dir=rtl value="<? $title?>" name="title" size="20">&nbsp;&nbsp;&nbsp; </p>
	<p align="left">order<span lang="fa">&nbsp;&nbsp; </span>&nbsp;&nbsp; <input type="text" value="<? $order?>" name="order" size="20"></p>
	<p align="left">section<span lang="fa">
	</span>&nbsp;&nbsp; <span lang="fa">
	<input type="text" name="section" value="<? $section?>"  size="20"></span></p>
	<p align="left"><span lang="fa">&nbsp;</span>article id <input type="text" name="id" value=<?php $_POST['id'] ?> size="20"></p>
	<p align="left"><span lang="fa">&nbsp; </span>article text</p>
	<p align="left"><textarea dir=rtl rows="12" name="text" cols="60"></textarea></p>
	
	<p align="center"><input type="submit" value="save" name="save"></p>
</form>

Posted: Mon Jul 16, 2007 9:27 am
by volka
<?php $_POST['id'] ?>
there's no echo or print there.

Posted: Mon Jul 16, 2007 9:36 am
by Gente
Also use '<?php' + '?>' tags instead of '<?' + '?>'