tomash Posted September 13, 2006 Share Posted September 13, 2006 [code](Line 56) $updt = "UPDATE HillHouse SET content='$_POST['pCContent']', date='$_POST['date']', time='$_POST['time']' WHERE name='$pagename'";[/code]the error I'm getting is:[quote]Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in ******************************** on line 56[/quote]It is connecting to the database fine.I think this may be in the wrong place - sorry if it is. Its just it uses php aswell so...Thanks for your help. It's probably something stupid i've missed! Link to comment https://forums.phpfreaks.com/topic/20656-solved-whats-wrong-with-this-code/ Share on other sites More sharing options...
maxic0 Posted September 13, 2006 Share Posted September 13, 2006 Im not sure but i think its cause you got the '$_POST['whatever']'.The quote marks are the same..Try setting all the $_POST as variables.So like $whatever = $_POST['whatever'];and then insert '$whatever'.Hope this helps ;) Link to comment https://forums.phpfreaks.com/topic/20656-solved-whats-wrong-with-this-code/#findComment-91340 Share on other sites More sharing options...
ronverdonk Posted September 13, 2006 Share Posted September 13, 2006 This is wrong: you use single quotes within a single-quoted string:[code]content='$_POST['pCContent']' AND date='$_POST['date']'[/code]Ronald 8) Link to comment https://forums.phpfreaks.com/topic/20656-solved-whats-wrong-with-this-code/#findComment-91341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.