homepage Welcome to WebmasterWorld Guest from 174.129.163.183
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
insert data in mysql with php
do you have a simple script
digi_mind




msg:1279878
 2:11 pm on Mar 25, 2003 (gmt 0)

I just want to insert my name into the database from a web site that is using php.

I want the name to be inserted as soon as SUBMIT is pressed and a new window saying name saved should show.

I just need this very simple script, nothing else.

thanks.

 

jatar_k




msg:1279879
 4:48 pm on Mar 25, 2003 (gmt 0)

Well first you would have to make the form to submit the name to the db. Then set your insertion script as the form action.

The script then needs to have these elements.

connect to mysql using
mysql_connect [php.net]

select your db using
mysql_select_db [php.net]

send your insert query using
mysql_query [php.net]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved