First I want to say that from browsing through some of your posts I can tell it takes brains to PHP. Most of You guys have it! I'm excited to learn!
I am literally 3 hours into MySQL and PHP and have hit a bit of a snag. Maybe my post is premature, but I'm sure there is someone in this forum that can offer great help with a simple and elemenrty script such as this:
Code: Select all
<?php
mysql_connect ("", "", "");
$database = "incomming";
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO requests VALUES ('$FirstName', '$LastName', '$Title',
'$SalonName','$Address1', '$Address2', '$City', '$State', '$Zip', $Phone', '$Email',
'$YesNo', '$Date', '$Comments')";
$result = mysql_query($query);
mysql_close ();
?>Code: Select all
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| first | varchar(15) | YES | | NULL | |
| last | varchar(25) | YES | | NULL | |
| title | varchar(15) | YES | | NULL | |
| salon_name | varchar(20) | YES | | NULL | |
| address1 | varchar(20) | YES | | NULL | |
| address2 | varchar(20) | YES | | NULL | |
| city | varchar(15) | YES | | NULL | |
| state | varchar(15) | YES | | NULL | |
| zip | varchar(12) | YES | | NULL | |
| phone | varchar(25) | YES | | NULL | |
| email | varchar(25) | YES | | NULL | |
| requested_cat | varchar(20) | YES | | NULL | |
| comments | varchar(255) | YES | | NULL | |
| date | varchar(10) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+The problem is that there are no errors displayed when the script is run with the variables assigned but when I select * from database; nothing seems to have been entered.
Once I find a solution, I'll regain my confidence...Thanks for your help.
Kind Regards,
Sleeve