Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default Using Created Database

    Ok. So I know how to make a database using PHP MyAdmin thing, but, I haven't a clue how to use it on my site. I've been searching around and just can't figure it out. I've tested a php page on my host to see if it works using simple script and it works fine, but, I don't know how to use MySQL. I know you put php script in a .php file but what about MySQL? Do I need to even make a file or does it happen directly from PHP MyAdmin? I use Dreamweaver if that helps at all. I've gone on w3schools.com for all my PHP and MySQL scripting needs, but, I don't know either language, planning to learn what I need as I go along.

    The only thing I've gathered that seems to be relevant is:

    $con = mysql_connect("localhost","username","password");

    But what then? In the PHP MyAdmin thing there is a small amount of code that it shows when I am viewing a table that I can click a button to change it to PHP code and Ive also pasted that into my file, but I only get a blank white page when I upload it.

    Basically I am almost clueless. I need a little boost in the right direction.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Mar 2003
    Location
    NC
    Posts
    725
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    What are you trying to do?

    MySQL is a database program. It is used to store information within a DB. You will have to put information in the DB to retrieve it with the PHP, or of course have the PHP create/add data.

    It sounds like you are just trying to make a page, you don't need to make it use MySQL. If you are trying to make a page with MySQL you probably want to try another forum - you have figured out the cPanel side of things now you have to get the programming bit down.

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default

    Yea I guess I'm not exactly sure which forums to be in. I'm not exactly trying to make a page with MySQL, nor PHP, I mean, maybe I am. Basically I want people to be able to search my on my site, like not nessessarily a search bar, but that would be nice too, but when they click on a link it takes data from a database and puts it on a page it links to. I did put information into the databases I created, made tables, set primary keys. Now I just need to know where to go from here. How to implement these databases on my site. Maybe I am in the wrong forums, in which case it'd be nice to be directed to a correct one, or the type of one to be looking for.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    You should start with a premade script from a place like hotscripts.com that does what you want. There are plenty of search scripts available that you can play with.

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Default

    I don't want premades that won't help because I still won't know what to do with them. My problem is is I dont know where to put the code, what kind of file, to do what. I don't know how to access the database that I created nor the content that I filled it with. Once I know where to put the script I create/find to access the database and the content in it, then I will find the script or find the knowledge to create the script. But I need to know where to script it.

    Problem with all these tutorials and pre-mades is that it doesnt tell me where to put it. Nor do I know how to access the database I created, how to incorporate it on my site.

Similar Threads & Tags
Similar threads

  1. [case 45836] CPANEL API not adding created user to created database
    By tdmohr in forum Archived Feature Requests
    Replies: 23
    Last Post: 03-19-2011, 07:07 AM
  2. How can I see if any user have created a pgsql database?
    By Kent Brockman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-16-2008, 10:47 PM
  3. Database created but not showing
    By itobin in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 07-10-2007, 11:38 AM
  4. auto-created database and user
    By dnevins in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-17-2006, 04:51 AM
  5. need password for auto-installer created database
    By johngute in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-15-2004, 08:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube