![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| http://www.php.net/manual/en/ In the section: "VI. Function Reference" you can find the functions that are designet for your specific DB, which-ever it is.. Example (with no error-handling): HTML-file: <html> form class='udstyr' method='post' action='filename.php'> <input type="text" value="" name="car" size="50"> <input type="text" value="" name="color" size="50"> <input type="submit" value="Insert"> </form> </html> PHP-file (filename.php): <?php $car = $_REQUEST["car"]; //This is how you get the information from your form to your php-script !! $color = $_REQUEST["color"]; $link = mysql_connect("hostname","username","password", TRUE); //mysql_connect is used if your DB is mysql. //If other DB is used, look here : http://www.php.net/manual/en/ mysql_select_db("your_DB_name"); $query= 'insert into your_table ('id', 'car', 'color') values (NULL, '$car', '$color')'; // make sure your_table exists in your DB (create it first) mysql_query($query); mysql_close() ?> Simon "Newsscanner" <frankied@NOSPAM.netvigator.co.uk> skrev i en meddelelse news:t1YdLrAbAduBFwY9@netvigator.co.uk... > was wondering if anyone can help me. I am looking for a form in PHP > which stores data, which have been entered in a form, into a database. > I have already got my database, I also know how to set up a HTML form, > so, basically, just that bit in the middle, the PHP part which sends > the entered data to my database would be a great help. > Any help will be much appreciated. > Thanks, > Newsscanner > -- > Frankie Deschacht > Musician and Music Teacher Muzikant en Muziekleraar > http://www.berkshire-music-institution.org.uk > http://www.musicandjazz.cjb.net > | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: code, required |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Required Please | Aids | Ebay Technical Questions | 8 | 05-31-2007 10:54 AM |
| NO RECRUITING and NO SELLING is required | Mike | Building An Internet Business | 0 | 05-29-2007 2:04 AM |
| SEo Required | jags | Website Reviews And Website Questions | 34 | 05-28-2007 12:13 AM |
| What's wrong with this code please? | Big Bill | Website Reviews And Website Questions | 13 | 05-28-2007 12:13 AM |
| BB code vs HTML | modric | HTML | 3 | 09-29-2006 1:25 PM |
| Featured Websites | ||||
|