WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-29-2004, 05:23 AM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default very basic php/mysql help needed.

I'm a total newbie when it comes to mysql. I wanted to create a faq page that I could edit online. Now I've found this: http://www.technetguru.net/design/faqmasterflex.php

I think I've created a database, and I can look at the index page: http://www.typicaldutchstuff.com/FAQ...Flex/index.php

But it doesn't connect to the database. I think the problem lies in config.php This is my code:

Code:
<?php

$link = mysql_connect("localhost","root","");
mysql_select_db("faqmasterflex");

$username = "blablabla";

$password = "morebla";

?>
What do I have to change? I have tried so many thing, but it just doesn't work.
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #2 (permalink)  
Old 08-29-2004, 07:34 AM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

In this line of code:

Code:
$link = mysql_connect("localhost","root","");
you will need to supply your MySQL username and password in order to connect to your database.

Think of it like this:

Code:
$link = mysql_connect("localhost","username","password");
Leave the first parameter ("localhost") just as written. Fill the other two in accordingly.

Whatever you do ... never post your username and password publicly.


Part Two

Change this part of the code back the way it was.

Code:
$username = "admin"; 

$password = "admin";
You will be provided an option once you log into the admin panel for the script to change the Admin password.

This username and password is different than the MySQL username/password.
Reply With Quote
  #3 (permalink)  
Old 08-29-2004, 11:22 AM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

thank you for your help. I've changed the settings, but when I go to my config page to log in, I just get a blank page. I'm completely lost with this, it's so frustrating. What else could I have done wrong?
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #4 (permalink)  
Old 08-29-2004, 08:03 PM
ronniethedodger's Avatar
WebProWorld 1,000+ Club
 

Join Date: Aug 2003
Location: Central US
Posts: 1,581
ronniethedodger RepRank 0
Default

The only thing I can thing of is that you are not connecting to your database.

I cannot read Dutch. But I am looking at your hosting plans and it does not appear that you have MySQL.

How did you set up the database originally?

The instructions for installation:

Quote:
Create a MySQL table, preferably faqmasterflex, then copy and paste SQL from faqmasterflex.sql info with your favorite GUI SQL tool (phpMyAdmin).
Open faq_config.php and change MySQL connection variables.
Upload contents of PassMasterFlexPlus to your web server.
Login using (if not changed in faq_config.php):


Username: admin
Password: admin
That's it!
If you have access to this database, can you verify that the tables 'faqcategories' and 'faqs' are present in your database? The database name should be 'faqmasterflex'.
Reply With Quote
  #5 (permalink)  
Old 09-01-2004, 05:01 PM
WebProWorld Member
 

Join Date: Apr 2004
Location: Netherlands
Posts: 80
wen_laat RepRank 0
Default

well, I do have MySQL, 'onbeperkt' means unlimited, so I have plenty to spare. But I got so frustrated with the whole thing, I gave up. Yes, I'm weak, I just figured something else out, and created this:
www.typicaldutchstuff.com/faq.shtml

just what I wanted, and sooooo easy! ;)
__________________
For all your typical Dutch products
info@typicaldutchstuff.com

Our website was featured in the UK Sunday Times of October 10th
Reply With Quote
  #6 (permalink)  
Old 11-17-2004, 05:35 AM
WebProWorld New Member
 

Join Date: Nov 2004
Location: Wiltshire, UK
Posts: 14
skypower RepRank 0
Default

I am no expert, but the location for the database is not alway "localhost" check with your isp, as mine if different.
Reply With Quote
  #7 (permalink)  
Old 11-20-2004, 08:40 PM
WebProWorld New Member
 

Join Date: Nov 2004
Posts: 7
hnofal RepRank 0
Default Hoda Nofal Romano

If you need help with your programming needs, we can help you. Please fee to email hoda nofal romano at support@globalwebsolutions.com

hoda nofal romano
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0