Php/mysql Help - Webmasters - Nairaland
Nairaland Forum › Science/Technology › Webmasters › Php/mysql Help (797 Views)
| 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]" ; 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']" ; 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. |
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
; or die(mysql_error());