Skip to content Skip to sidebar Skip to footer

T_VAR Error With PHP

i am working on an html form that sends data to a php file which displays it... eventually i will have the php send the data to a mysql database. when i submit my form, i get a php

Solution 1:

Get rid of 'var' in front of var $name = $_POST['name']; and the other variables. The var keyword was only used for classes (which your script is not).


Solution 2:

Don't use the keyword var in that case. Just say:

$name = $_POST['name'];

Solution 3:

You may want to read about variable on php.net.

There is a usage for that keyword. In php4 var was used to define class property. In php5 it's public/protected/private.


Post a Comment for "T_VAR Error With PHP"