Jump to content


Photo

SOS Databases and mySQL HELP PLZ


  • Please log in to reply
19 replies to this topic

#1 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 19 May 2006 - 11:12 AM

First of all i have taken a look at the phpmyadmin and my sql ive tried piecing it all together but im still unable to understand it all. What im trying to accomlish is that i have my website running with Uniform server and i have access to the APANEL so i can then start the sql, i have changed the script so i can start it from anywhere. but the real problem lies where i need a register and login for my site, and i need it to be a database login, not .htaccess. I think this is kinda like what olajideolaolorun has on his forums here like the login and register, maybe, i dk. THANK YOU in advance. :(

If you need more info to try and help me just ask, thx.
oCONKERo

#2 megan

megan

    Support Team Member

  • Support Team
  • PipPip
  • 92 posts

Posted 19 May 2006 - 11:25 AM

OK - in order to do what you want you will need to store usernames and passwords in the database and then you will need to use a scripting language such as PHP (already part of the uniform server setup) to interact with the database

So you will have to learn about MySQL and about PHP

You can learn about MySQL by going to http://www.tqnyc.org...mysql/index.php

You can get started learning PHP by going here http://www.tizag.com/phpT/

there are lots of other places that offer tutorials on mysql and php - you can use google to find them Like This

This One also looks good

hope that helps, megan

#3 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 19 May 2006 - 11:28 AM

ok ok THANK YOU very much for your VERY VERY fast reply which took a time of like 2 minutes, lol , i will read up on those links Thanks again :(
oCONKERo

#4 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 23 May 2006 - 11:00 AM

Well im still kindof confused with this all after reading thru the websites u gave me for refrences. so i was wondering if anyone can help me with the script and script installation. THX
oCONKERo

#5 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 23 May 2006 - 08:04 PM

Take a look at this tutorial, http://www.phpfreaks...orials/40/0.php, for example on how to make the login system with more features than you requested.

#6 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 29 May 2006 - 08:20 PM

Um that site seams to be down think :(
oCONKERo

#7 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 08 June 2006 - 09:55 PM

Then try later :)

#8 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 12 June 2006 - 10:50 AM

Ok um... the thing is... where in the world... or the confusing phpmyadmin do i put this code?? i know hot to make a database and how to make tables in those databases but i get confused at the whole coding part as far as i see phpmyadmin is all visual. not code. this is the only part im stuck at im sure all the php coding for forms is simple, almost copy and paste.

and one more thing whats this include "db.php" the where or how can i make or get it?
oCONKERo

#9 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 12 June 2006 - 11:15 PM

After clicking the database name in phpMyAdmin, click SQL on top to put the code in.

#10 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 14 June 2006 - 07:46 AM

im sorry this is taking longer than expected but heres my problem now i have the code the one from that website you refrenced earlier but everytime is use any code it gives me an error, about some db.php on some line or rather i think i might have found what everyone is talking about. I jist need help with the username and pass. i think i got the rest.

"This is the db.php?"

$host = 'localhost';
$username = 'your_username';
$password = 'your_password';
$database = 'your_database';

$connection = mysql_pconnect($host, $username, $password);

$mysql_select_db($database, $connection);

Perform your mysql_query(); here.

oCONKERo

#11 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 14 June 2006 - 09:03 PM

If that "Perform your ...." is in the db.php, comment it out....

Also, you dont need to use pconnect, you can just use connect.

#12 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 15 June 2006 - 10:51 AM

ok thx ill edit it when im home im kinda at school :) but itas over in 4 days just ned to write finals then ill fool around with sql ect full time :)
oCONKERo

#13 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 15 June 2006 - 06:53 PM

Ok. :)

#14 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 25 June 2006 - 12:33 AM

yeah i dont know if im close but still no cigar um ill get back to you on the error msg status. i think its still the old one
oCONKERo

#15 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 04 July 2006 - 10:50 AM

Uhhh, Yeah this should be similair to the finished product i just need to know what the username and password is, is it the admin pass ar just and www pass or is there a diferent one for mysql becuz it doesnt ask me anything to get in there but i didnt change nething so it should be the defualt username and pass.and the database i want the users to be stored in is "users". ah and do i just leave the host as localhost or my remote or local ip?

"db.php"

$host = 'localhost';
$username = 'your_username';
$password = 'your_password';
$database = 'users';

$connection = mysql_connect($host, $username, $password);

$mysql_select_db($database, $connection);


Thanks For the Help.
oCONKERo

#16 MrX

MrX

    The Mad Theorist

  • Support Team
  • PipPip
  • 167 posts
  • Location:IRC :P
  • Wiki ID: MrX
  • IRC Nickname: MrX, MrX- and MrX_

Posted 05 July 2006 - 12:38 AM

Just leave the host as localhost :(

Uniform Server mySQL Defaults: Username = root ; Password = root

Instructions on how to change the password can be found here.

#17 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 05 July 2006 - 01:03 PM

ohhh thanks i might be able to start figuring this out i also found a script that tells u if the sql if working or not woth the username and pass u use... thanks im gonna try this cool script out and thanks for the defaults

Update:

yep i used this php script and i can connect so ima use the same user and pass for now and see if i can get some sort of user registration and login goin, heres what helped me

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MySQL Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p>MySQL test</p>

<?php
mysql_connect("localhost", "root", "root");
if (mysql_select_db("phpmyadmin")){
echo "CAN connect to database";
}
else{
echo "CAN NOT connect to database";
}

?>

</body>
</html>

oCONKERo

#18 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 09 July 2006 - 05:26 PM

Thats what MrX was telling you.... :(

Edited by olajideolaolorun, 09 July 2006 - 05:26 PM.


#19 oconkero

oconkero

    Junior Member

  • Member
  • Pip
  • 41 posts

Posted 14 July 2006 - 11:50 AM

right i got it working and ive studied sql and php together with databases so i do have a php few scripts that ban users ect but i need one that bans users with admin ect and protects certain pages most scripts i com across dont protect pages at all thet just kinda like a gate with no walls u can just walk around the gate like on these scripts u can just type the html address of that page and ban ur there.... i cant have unregistered or banned users finding this out and well its crap. unbeliveable, unacheivable crap, i cant have it. so if anyone know any scripts better"" it would be great... oh an i cant seam to load phpfreaks... ive tried for 3 weeks i only get a white page. can anyone else load it?

Thanks to everyone for the great help on teaching a begginer :D
oCONKERo

#20 olajideolaolorun

olajideolaolorun

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 15 July 2006 - 10:25 PM

:D :lol:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users