php coding for search form
Posted: Sun Aug 23, 2009 10:07 am
Hi,
I have created a form in Dreamweaver and connected mySQL database to it. I am having great trouble in creating a script for it. I have found many on the internet but just cannot get my head around it. The php code I have so far is:
<?php
$username = "root";
$password = "";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
$selected = mysql_select_db("jobjar",$dbh)
or die("Could not select jobjar");
?>
and I have attached a print screen of my form and what it looks like when previewed in firefox... can anyone help?
I have created a form in Dreamweaver and connected mySQL database to it. I am having great trouble in creating a script for it. I have found many on the internet but just cannot get my head around it. The php code I have so far is:
<?php
$username = "root";
$password = "";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
$selected = mysql_select_db("jobjar",$dbh)
or die("Could not select jobjar");
?>
and I have attached a print screen of my form and what it looks like when previewed in firefox... can anyone help?