Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
I need a script where I can insert to a mysql database
Old 09-15-2007, 10:34 PM I need a script where I can insert to a mysql database
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
I need a script where I can insert to a mysql database
but have the values come from a form as variables that are passed to mysql




-
John
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
 
Register now for full access!
Old 09-15-2007, 10:43 PM Re: I need a script where I can insert to a mysql database
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
That would be in every beginning php book and tutorial.

http://www.php-mysql-tutorial.com/ph...-php-forms.php

http://www.php.net/manual/en/function.mysql-query.php
joder is offline
Reply With Quote
View Public Profile
 
Old 09-17-2007, 07:09 AM Re: I need a script where I can insert to a mysql database
killdude69's Avatar
Average Talker

Posts: 24
Name: Brandon Miller
Trades: 0
Go with an SQL query simular to this.

PHP Code:
<?php
  $con 
mysql_connect('db_server','db_name','db_password');
  if(!
$con){
     die(
'Cannot Connect: ' mysql_error());
  }
 
  
mysql_select_db('db_name');
 
   
$sql "INSERT INTO some_table (somefield, someotherfield)
            VALUE('
$_POST[user_input_text]','$_POST[more_input_text]')";
  
mysql_query($sql$con);
?>
killdude69 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I need a script where I can insert to a mysql database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11261 seconds with 12 queries