Jump to content

creating a database


royax

Recommended Posts

Hi there! I'm new to php and mysql. I just downloaded and installed wamp server on my xp! now I want to create a personal website with registration form and log-in. How to create this database in phpmyadmin? and how to connect to the database? i'm kinda new with this stuff! Can somebody help me! If I'm in a wrong place pls help find one!
Link to comment
Share on other sites

[quote author=royax link=topic=106116.msg424128#msg424128 date=1156871450]
Hi there! I'm new to php and mysql. I just downloaded and installed wamp server on my xp! now I want to create a personal website with registration form and log-in. How to create this database in phpmyadmin? and how to connect to the database? i'm kinda new with this stuff! Can somebody help me! If I'm in a wrong place pls help find one!
[/quote]

i am not sure how you create a database in phpmyadmin, but the general syntax is:

create database database_name;

use database_name;

create table bla(
your_column_titiles
.....
....
..);

To connect to a database using php:
<php?
$mysql_connect = mysql_connect("$hostname", "$username", "$password")
or die("Unable to connect to MySQL");
echo "Connected to MySQL<br>";

mysql_close($mysql_connect);
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.