Jump to content

craiglaw2504

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

craiglaw2504's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Morning Guys, I have made a simple html form that uses an insert.php to input data in to my mysql DB (that is used for my search). At the moment the form only consists of text fields, however I need to updload an image and a PDF to the record (individual columns have been created). I basicly want to upload the two items to the server and simply store the file path in the database....... problem is I have no ide how to do this short of manualy uploading the two and manualy typing the filepaths into the mysql DB. Can someone please help me out?! Code so far (stripped down to basic's):- [uHTML ]Form[/u] <form action="insert.php" method="post"> Project Number: <input type="text" name="projectnumber" /> Property: <input type="text" name="property" /> Address: <input type="text" name="address" /> City: <input type="text" name="city" /> Post Code: <input type="text" name="postcode" /> <input type="submit" /> </form> insert.php $sql="INSERT INTO database_name (projectnumber, property, address, city, postcode) VALUES ('$_POST[projectnumber]','$_POST[property]','$_POST[address]','$_POST[city]','$_POST[postcode]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> This needs to be upload at the same time as the new record is inserted so that it gets matched up witht the right property. Would really appreciate help on this as I have scoured the net for hours and short of purchasing a program (which doesn't teach jack) can figure it out. Thanks again, in advance. Kuga
  2. craiglaw2504

    Hi

    Morning All, I posted a few posts yesterday, so thought it prudant to introduce myself. I'm currently in the process of building a company website and product website. Reletavily good with HTML and CSS but just starting to learn PHP, MYSQL and AJAX.
  3. Nice once, cheers mate! I will give it a bash and let you know how I get on! Appreciate the site links!
  4. Hi thanks for your reply. I have tried the script on the link already and couldnt get it to work. It wouldn't even pick up my config.php file (for mysql), even tho its a working script and when it did it just kept throwing up an error trying to use a user and password that are not even in my config. I was just looking to start a whole new scratch based on my search criteria. Unsure where to start tho. Thanks again
  5. Hi, I'm trying to make an AJAX live search, that will extract information from a MYSQL database and narrow down the search as the user types characters. Exactly like this post:- http://www.phpfreaks.com/forums/index.php/topic,219984.msg1008498.html#msg1008498 I need to be able to search for a property (as opposed to a user) and then display the rest of the information for the property in a table format. I can't seem to be able to adapt the one for the above post and as we are a charity can't afford to employ a web designer (plus I really would like to learn). Please, please can someone help me?! Really would appreciate it as I have spent days trying to sort this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.