Jump to content

Its late... Where have I gone wrong..... unexpected t_variable


petroz

Recommended Posts

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');

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?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.