value not shown

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

value not shown

Post 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>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

<?php $_POST['id'] ?>
there's no echo or print there.
User avatar
Gente
Forum Contributor
Posts: 252
Joined: Wed Jun 13, 2007 9:43 am
Location: Ukraine, Kharkov
Contact:

Post by Gente »

Also use '<?php' + '?>' tags instead of '<?' + '?>'
Post Reply