homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

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

10+ Year Member



 
Msg#: 658 posted 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

WebmasterWorld Administrator jatar_k us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 658 posted 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved