37 Replies - 1764 Views - Last Post: 28 December 2012 - 04:11 AM
#16
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:09 AM
So i put a quote around the names on all the VARCHAR feilds?
#17
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:10 AM
that would be a start.
#18
#19
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:15 AM
question, why do you have separate fields for day/month/year? you can easily get those out of SQL (date functions!) and additionally SQL can do date calculations on a proper DATE field.
#20
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:16 AM
#21
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:20 AM
#22
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:22 AM
#23
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:30 AM
I have no idea
Nothing seems to work, i've tried every thing u guys said, and i appriciate it, i really do!
#24
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:37 AM
what is the current state of code?
#25
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:39 AM
<?php
//Database login information
$mysql_host="****";
$mysql_username="****";
$mysql_password="****";
$mysql_database_name="****";
//Textbox information
$name=$_POST['name'];
$surename=$_POST['surename'];
$day=$_POST['day'];
$month=$_POST['month'];
$year=$_POST['year'];
$gender=$_POST['gender'];
$report=$_POST['raport'];
// Make a MySQL Connection
mysql_connect($mysql_host, $mysql_username, $mysql_password) or die(mysql_error());
mysql_select_db($mysql_database_name) or die(mysql_error());
// Insert a row of information into the table "report"
mysql_query("INSERT INTO report(firstname,surename,day,month,year,gender,report) VALUES('$name', '$surename', '$day', '$month', '$year', '$gender', '$report')") or die(mysql_error());
//Suceeed message
echo "Data Inserted!";
?>
iI've quoted the variables
This post has been edited by Dormilich: 28 December 2012 - 03:42 AM
#26
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:44 AM
#27
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:46 AM
#28
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:48 AM
so, and now for the SQL injection problem …
#29
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:48 AM
Now i will make a login system, and a table to show the MySql table, in a list or something!
#30
Re: Problem, "Unknown column 'Jon' in 'field list'"
Posted 28 December 2012 - 03:50 AM
first you need to get rid of the SQL Injection problem.
|
|

New Topic/Question
Reply




MultiQuote




|