php coding for search form

Discussion in 'PHP' started by h4r00n, Aug 23, 2009.

  1. #1
    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?
     

    Attached Files:

    h4r00n, Aug 23, 2009 IP
  2. Kyosys

    Kyosys Peon

    Messages:
    226
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what is the problem? You want us to make the script for you?
     
    Kyosys, Aug 23, 2009 IP
  3. h4r00n

    h4r00n Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    A little help with how I should start it off. I am a newbie with php and the scripts online aren't any help because they are not what I am after...
     
    h4r00n, Aug 23, 2009 IP
  4. iam.xavier

    iam.xavier Well-Known Member

    Messages:
    521
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    125
    #4
    What exacltly you want in HELP ?

    Do you want that form to be searchable from the Database ?

    Did you create table fields accordingly ?

    Thanks
    -Xak
     
    iam.xavier, Aug 23, 2009 IP
  5. h4r00n

    h4r00n Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    I want users to select the criteria in the form, hit search and the results will appear... I have a database and tables
    Thanks
     
    h4r00n, Aug 23, 2009 IP