![]() |
#1
|
||
|
Databases
How would i go about making a database, and connecting to a database from within 1 page? (Eg index.php)
A database which creates: Username Password *ID D.O.B and then use this within the site for when users register? I have a login script too, i didn't make it, i found it from the net, how would i be able to use this to only let people who login use certain pages? Also.. I need some help with the site im making too, at the moment i'm concentrating on constructiong the site, then design later, this is what i have at the moment: <a href="www.no-remorseclan.com/My%20Website">HERE</a> |
#2
|
|||
|
html code is disabled here Xing, use the BBcode instead. = [url] or then name* ; and as closing tag
Cant help u on the DB tho, im still learning it And if you remove the space in your folder name you wont get the % between the words, use _ for instead.
__________________
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Found on Youtube: Quote:
|
#3
|
||
|
<?php
$sql = mysql_connect("host","username","password"); mysql_select_db("Db name",$sql); $result=mysql_query("SELECT * FROM tablename"); //pull it out while($myrow = mysql_fetch_array($result)) { printf("$myrow[somename]"); } ?> |
#4
|
||
|
[quote:eca061018e="PHP-Largo"]<?php
$sql = mysql_connect("host","username","password"); mysql_select_db("Db name",$sql); $result=mysql_query("SELECT * FROM tablename"); //pull it out while($myrow = mysql_fetch_array($result)) { printf("$myrow[somename]"); } ?>[/quote:eca061018e] forgot: it should have the debug : here is the code: [code:1:eca061018e]<?php $sql = mysql_connect("host","username" ;,"password") or die("could not connect"); mysql_select_db("Db name",$sql) or die("could not select DataBase"); $result=mysql_query("SELECT * FROM tablename") or die("could not execute query"); //pull it out while($myrow = mysql_fetch_array($result)) { printf("$myrow[somename]"); } ?>[/code:1:eca061018e] |
#5
|
||
|
really the query is whatever you want it to do ... just do the correct coding and it should work out fine
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Databases | phphq.Net Forums | 13 | 10-08-2004 08:23 AM | |
moving databases | G.I.JOE*MFA* | Web design and Programming | 4 | 02-11-2004 07:02 AM |