₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,347,392 members, 8,527,759 topics. Date: Tuesday, 01 December 2026 at 08:50 AM

Toggle theme

Php/mysql Help - Webmasters - Nairaland

Nairaland Forum › Science/Technology › Webmasters › Php/mysql Help (797 Views)

1 Reply (Go Down)

Php/mysql Help by debeginin(op): 10:37pm On Dec 14, 2010
i keep getting " Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\cms\admin\edit.php on line 3" in this code
<?php
include('includes/functions.php');
$query=mysql_query("SELECT * FROM posts WHERE ID = $_GET[id]"wink; or die(mysql_error());
$post=mysql_fetch_array($query);
?>
<html><head>
<title>Edit Post</title></head>
<body>
<form action=editpage.php method="POST" name="editform">
<table align="center">

<tr><td><label for=pName>Post Title</label></td>
<td><input type="text" name="pTitle" value=<?php echo $post['Title'];?>/></td>
</tr>

<tr><td><label for=pName>Post Author</label></td>
<td><input type="text" name="pAuth" value=<?php echo $post['Author'];?>/></td>
</tr>


<tr><td><label for="pName">Post Content</label></td>
<td><textarea style="height:400px;width:300px;"name="pCon"><?php echo $post['Content'];?>/></textarea>
</tr>

</table>
</form>
</body>
</html>
please what could be the problem?
Re: Php/mysql Help by ogzille(m): 10:48pm On Dec 14, 2010
$query=mysql_query("SELECT * FROM posts WHERE ID = $_GET['id']"wink; or die(mysql_error());

No apostrophe
Re: Php/mysql Help by debeginin(op): 6:33am On Dec 15, 2010
Stil getting the error
Re: Php/mysql Help by viewspro: 5:12pm On Dec 15, 2010
ensure the id querystring is set
Re: Php/mysql Help by debeginin(op): 10:01am On Dec 16, 2010
Thanks guys.I have got it working.
1 Reply

Php/mysql Pin And Serial Number Generation Script • Wamp Server Ebook Ft Install Wamp, Write Php / Mysql / Mysql Console • Learn Cakephp, Php/mysql For Free With Video Tutorials • 2 • 3 • 4

Create Banners On Your Facebook - Free • Some Advertising Secrets • Stay In Touch