Loading...


bookmark - Php And Mysql Programming anyone knows a code for mysql and php

Php And Mysql Programming - anyone knows a code for mysql and php

 
 Discussion by catslic with 2 Replies.
 Last Update: May 5, 2008, 9:49 am
 
bookmark - Php And Mysql Programming anyone knows a code for mysql and php  
Quickly Post to Php And Mysql Programming anyone knows a code for mysql and php w/o signup Share Info about Php And Mysql Programming anyone knows a code for mysql and php using Facebook, Twitter etc. email your friend about Php And Mysql Programming anyone knows a code for mysql and php Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

hi everyone!

I am making a program using php and mysql...I am a noob on this so i need your help guys...I want to make a simple program that will some values and then store them on a database and then retrieve them...uhmm let me give an example out put of what i need.

This is the example say..: Enter First Name:
Enter Last Name:
Enter Age:
Enter Address:

..those are the data needed for input values...my question now is how can I make a database which will store the data of the inputed values and then retrieve them afterwards? I know there are lots of php and mysql gurus here which can help me...thanks guys in advance...:lol:

[note=rvalkass]
Moved from Making Money Online to PHP Programming.
[/note]

   Mon May 5, 2008    Reply         

To create the database, I suggest making use of a tool such as phpMyAdmin. This will allow you to create the fields you need for your database to store your data. An example of the sort of table code I would use for this task is:

CODE

CREATE TABLE `addresses` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`firstName` TEXT NOT NULL ,
`lastName` TEXT NOT NULL ,
`age` INT NOT NULL ,
`address` LONGTEXT NOT NULL
) ENGINE = InnoDB


Once your table is set up in your database, you will need to have some PHP code to connect to the database, to insert new rows, and to retrieve rows from the database. You will need the following basic code to connect to the MySQL database:

CODE

$dbh = mysql_connect('localhost', 'MYSQL USERNAME', 'MYSQL PASSWORD') or die('Error: ' . mysql_error());
mysql_select_db('DATABASE NAME') or die('Could not select database');


Obviously, replace the bits in capital letters with your relevant information.

There is a basic example on the PHP website, along with a full function list. They will be useful to you.

Your PHP script will need to accept values from an HTML form, and INSERT them into the database. It will also need to SELECT the values in the database and display them to the user.

   Mon May 5, 2008    Reply         

thanks man! i appreciate your assistance...i'll let you know once i finished my program...i appreciate the infos :lol:

   Mon May 5, 2008    Reply         


Quickly Post to Php And Mysql Programming anyone knows a code for mysql and php w/o signup Share Info about Php And Mysql Programming anyone knows a code for mysql and php using Facebook, Twitter etc. email your friend about Php And Mysql Programming anyone knows a code for mysql and php Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Similar Topics:

Mysql Php Apache Downloads And Se...

Mysql, PHP, Apache downloads were easy enough. Then came the setup process. This seemed to be an endless mess of going back and forth trying to get the programs to work together properly. Finaly I got them working after about 48 hours. There are great tutorials on the setup process, but only one or ...more

   20-Apr-2008    Reply         

Best Php And Mysql Editor For Noobs

hi there guys, from my previous posting, i am a noob in php and mysql programming. I want to know if there are any php and mysql editors which are best for me as a noob. i appreciate your kindness ...more

   06-May-2008    Reply         

Codelobster Php Edition

I strongly recommend you to try Codelobster PHP Edition. It's a free PHP IDE, which also can be used like editor for HTML, PHP, CSS, JavaScript files with very useful option Portable. Shortly about basic features: - Highlighting, autocomplete and context hel ...more

   18-Dec-2010    Reply         

Php Preg Replace    Php Preg Replace (1) (11) "register.php" !The Interesting Point!  "register.php" !The Interesting Point!