Jump to content


Photo

creating a database


  • Please log in to reply
1 reply to this topic

#1 royax

royax
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 29 August 2006 - 05:10 PM

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!

#2 dug

dug
  • Members
  • PipPip
  • Member
  • 20 posts

Posted 29 August 2006 - 05:37 PM

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!


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);
?>






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users