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
mayanktalwar1988
Forum Contributor
Posts: 133 Joined: Wed Jul 08, 2009 2:44 am
Post
by mayanktalwar1988 » Wed Jul 22, 2009 2:58 pm
Code: Select all
<?
$id=$_GET['id'];
<table>
<form action='add_topic.php' method='post'>
<tr><td>Name</td><td>:</td><td><input type='text' id='name' name='name' /></td></tr>
<tr><td>Email</td><td>:</td><td><input type='text' id='mail' name='mail' /></td></tr>
<tr><td>Title</td><td>:</td><td><input type='text' id='title' name='title' /></td></tr>
<tr><td valign='top'>Post</td><td valign='top'>:</td><td><textarea id='post' name='post' rows='7'></textarea></td></tr>
<tr><td> </td><td> </td><td><input type='submit' value='Post Topic' /> <input type='reset' value='Reset Fields' /></td></tr>
<input type='hidden' id='cat_id' name='cat_id' value='".$id."' />
</form>
</table>
?>
error
Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\customo\create_topic.php on line 3
where is the prob
and this is the browser adress when this script is called
http://localhost/customo/create_topic.php?id=1
spider.nick
Forum Commoner
Posts: 72 Joined: Wed Jul 15, 2009 12:22 pm
Location: Overland Park, KS
Post
by spider.nick » Wed Jul 22, 2009 3:10 pm
Your error stems from PHP trying to compile your HTML code. If you want to display HTML to the screen, from within PHP, you need to do:
Nick
mayanktalwar1988
Forum Contributor
Posts: 133 Joined: Wed Jul 08, 2009 2:44 am
Post
by mayanktalwar1988 » Wed Jul 22, 2009 3:22 pm
i have one more question ...as you can see from above script it is simple one form....i want to add clickable smileys to be inserted with text..just like phpbb....i am searchin on how to do it..but found nothing ..help