TGWSE_GY Posted May 22, 2009 Share Posted May 22, 2009 Ok I am getting, Parse error: syntax error, unexpected T_STRING in /home/.deceasing/thegayestever/thegayestcommunityever.com/dev/php/includes/content/members_home/profile_forms/post_profile_about_form.php on line 23. I have checked everything and still don't see the problem, I am really confused. <?php session_start(); //ABOUT ME echo $varAboutMe = $_POST['formAboutMe']; echo $varWhatImLookingFor = $_POST['formWhatImLookingFor']; echo $varAskMeAbout = $_POST['formAskMeAbout']; echo $varHobbies = $_POST['formHobbies']; echo $varTVandFilm = $_POST['formTVandFilm']; echo $varBooks = $_POST['formBooks']; echo $varMusic = $_POST['formMusic']; // Get CustID from cookie if (isset($_SESSION['Usr'])) { echo $varCustID = $_SESSION['CustID']; //Get database connection info and connect include('config.php'); $con = mysql_connect($Host, $Login, $Pass); mysql_select_db("login_ums", $con); //Store ABOUT <-------- This is line 23 mysql_query("UPDATE profile_about SET AboutMe='$varAboutMe', WhatImLookingFor='$varWhatImLookingFor', AskMeAbout='$varAskMeAbout', Hobbies='$varHobbies', TVandFilm='$varTVandFilm', Books='$varBooks', Music='$varMusic' WHERE CustID = '$varCustID'") or die mysql_error(); mysql_close($con); } else { header ("Location: http://www.thegayestcommunityever.com/dev/index.php?section=denied"); } if ($pageid =='0') { header ("Location: http://www.thegayestcommunityever.com/dev/index.php?section=membershom"); } else { header ("Location: http://www.thegayestcommunityever.com/dev/index.php?section=profileupdateall"); } ?> Thanks :-\ Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/ Share on other sites More sharing options...
RussellReal Posted May 22, 2009 Share Posted May 22, 2009 I think whats happening, your script is rendering 'die' as a string not as a function, do die(mysql_error()); instead of die mysql_error(); Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840007 Share on other sites More sharing options...
Cosizzle Posted May 22, 2009 Share Posted May 22, 2009 give this a try $query = "UPDATE profile_about SET AboutMe='$varAboutMe', WhatImLookingFor='$varWhatImLookingFor', AskMeAbout='$varAskMeAbout', Hobbies='$varHobbies', TVandFilm='$varTVandFilm', Books='$varBooks', Music='$varMusic' WHERE CustID = '$varCustID'"; $result = @mysql_query($query) or die("<b>A fatal MySQL error occurred</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error()); Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840024 Share on other sites More sharing options...
TGWSE_GY Posted May 22, 2009 Author Share Posted May 22, 2009 Nope niether one is working and getting the same error ??? Thanks Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840047 Share on other sites More sharing options...
dennismonsewicz Posted May 22, 2009 Share Posted May 22, 2009 check your include file of config.php for any unclosed brackets Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840048 Share on other sites More sharing options...
TGWSE_GY Posted May 22, 2009 Author Share Posted May 22, 2009 The config file is fine. Thanks ??? Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840068 Share on other sites More sharing options...
TGWSE_GY Posted May 22, 2009 Author Share Posted May 22, 2009 Its working thanks guys. Link to comment https://forums.phpfreaks.com/topic/159271-solved-unexpected-t_string-what-is-going-on-here/#findComment-840091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.