<?php
$username="root" ;
$password="sbasyn" ;
$database= "partsx";
$link = mysql_connect('localhost:3306', $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
echo '<br>';
mysql_close($link);
$Description =$_POST["Description"];
$Part_Number =$_POST["Part_Number"];
$Document =$_POST["Document"];
print $Description ;
echo "<br>";
print $Part_Number;
echo "<br>";
print $Document;
echo "<br>";
print $username;
echo "<br>";
print $password;
echo "<br>";
print $database;
echo "<br>";
echo "This is before connecting to mysql";
mysql_connect('localhost:3306', $username, $password);
mysql_select_db($database);[u][i][b]
//(Up to this point I have verified working)
$create = "INSERT INTO partsx VALUES($Description,$Part_Number,$Document)";
mysql_query($create);
echo "<br>";
echo "This is after the connection has been established";
echo "<br>";
print $create;
mysql_close();
?>
This post has been edited by macosxnerd101: 02 September 2011 - 08:17 AM
Reason for edit:: Please use code tags

New Topic/Question
Reply



MultiQuote









|