Welcome! Log In Create A New Profile

Advanced

Insert page

Posted by 49324063 Dee 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Insert page
October 19, 2013 08:16PM
Can someone please help me with my insert page, my form appears but once i click the submit button to add a new player the information disappears but it doesnt update the table in mysql

please see my query below


[
Language: PHP
if(isset($_POST[';submit';])){       $sql = "INSERT INTO registration (Name, Surname, Contact Number, Email, Position, Username, Password) VALUES (';$_POST[name]';,';$_POST[surname]';,';$_POST[contactnumber]';,';$_POST[email]';,';$_POST[position]';,';$_POST[username]';,';$_POST[password]';)";   mysql_query($query);
avatar Re: Insert page
October 19, 2013 09:56PM
Have you connected to the database ?
(You should only connect if isset($_POST)) is true and your data validates).


You will never succeed with your SQL query if you put your SQL into a variable named $sql and then use a variable named $query in your query.

Where does $query come from ?

Should be -

mysql_query($sql);
Sorry, only registered users may post in this forum.

Click here to login