petroz Posted September 6, 2009 Share Posted September 6, 2009 I am getting, the unexpected T_VARIABLE on line 10 Any help would be greatly appreciated. Thanks, P <?PHP include 'db.php'; $username = $_GET['user']; $nickname = $_POST['element_1']; $description = $_POST['element_7']; $email = $_POST['element_4']; $phone = $_POST['element_3_1'] . $_POST['element_3_2'] . $_POST['element_3_3']; $address = $_POST['element_5_1'] . $_POST['element_5_2'] . $_POST['element_5_3'] . $_POST['element_5_4'] . $_POST['element_5_5'] . $_POST['element_5_6']; $hours = $_POST['element_6']; $time = date("YmdHis"); $ip = getenv('REMOTE_ADDR'); Link to comment https://forums.phpfreaks.com/topic/173300-its-late-where-have-i-gone-wrong-unexpected-t_variable/ Share on other sites More sharing options...
corbin Posted September 6, 2009 Share Posted September 6, 2009 Seems to parse fine for me. Perhaps the error is in db.php? Link to comment https://forums.phpfreaks.com/topic/173300-its-late-where-have-i-gone-wrong-unexpected-t_variable/#findComment-913491 Share on other sites More sharing options...
bundyxc Posted September 6, 2009 Share Posted September 6, 2009 What does this say: print_r($_POST); EDIT: I wasn't sure what t_variable was, so I was just counting to line ten, and assuming that the problem had something to do with the $_POST array. Did it say which file the problem occurred in? Link to comment https://forums.phpfreaks.com/topic/173300-its-late-where-have-i-gone-wrong-unexpected-t_variable/#findComment-913493 Share on other sites More sharing options...
petroz Posted September 6, 2009 Author Share Posted September 6, 2009 Thanks for the replies. The error I am getting is point to the file I am showing, not db.php. This script is pretty basic and these vars and posts work for me on a few other scripts. This leads me to beleive that there might be some kind of encoding conflict with this server and the script. What encoding should this script use? Thanks, P Link to comment https://forums.phpfreaks.com/topic/173300-its-late-where-have-i-gone-wrong-unexpected-t_variable/#findComment-913503 Share on other sites More sharing options...
bundyxc Posted September 6, 2009 Share Posted September 6, 2009 http://tinyurl.com/kk5wm4 Link to comment https://forums.phpfreaks.com/topic/173300-its-late-where-have-i-gone-wrong-unexpected-t_variable/#findComment-913506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.