+ Reply to Thread
Results 1 to 3 of 3

Thread: Help needed Configuring php mysql script

  1. #1
    ohreally is offline x10Hosting Member ohreally is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    4

    Help needed Configuring php mysql script

    Hi guys!

    I recently decided to add a user registration form to my website. I purchased an Adobe Dreamweave extension which allows me to convert my form into one capable of working online. I would very much appreciate any help you guys can give.

    First they ask for the database username (now when I made the mysql database the username was ohreally_dbusername do I just put dbusername or do I need the ohreally to?)

    For host can I keep it s localhost?

    Also do I need to make any tables in mysql? I haven't a clue what to put in the table though (Its been awhile) There is a tables.php file and some other table files too.


    If anyone could help me I would truely be in your debt, thanks again!

  2. #2
    sikuneh is offline x10Hosting Member sikuneh is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    43

    Re: Help needed Configuring php mysql script

    You need to include your login name (for cPanel) with an underscore and then your username cPanelName_dbusername (or in your case, yes, ohreally_dbusername)

    Localhost is the easiest way to connect to the server.

    You should create a table in your database, call it 'users' or something. A good basic template (depending on what your site is for) id (for easy referencing), username (their chosen username for logging in) their password (their chosen password, for security you may choose to use a md5($_POST['password']) to encrypt it so it is harder to read and do not forget on a log-in script you write $password = md5($_POST['password']) so A) It doesn't get unenctypred, and B) it works) email address (for confirmation and letters from the site) and whatever else is dependent on your site. So it should be:
    id, username, password, email, etc.

    IMO it is easy to write a .SQL file and import it into the database. This is assuming table.users is not already created:
    Code:
    CREATE TABLE users(id int(255) AUTO_INCREMENT PRIMARY KEY, username varchar(20), password(50),email varchar(50), otherFieldsNecessary fieldType(fieldSizeIfNeededDefined))
    Note: Don't forget that, to reference your database, you need to write your cPanel username like above when defining your database connection:
    PHP Code:
    ohreally_dbName 
    Hope that helps.
    Last edited by sikuneh; 05-02-2010 at 08:04 PM.

  3. #3
    ohreally is offline x10Hosting Member ohreally is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    4

    Re: Help needed Configuring php mysql script

    I thank-you so much for your help! I got it working silly me I had that but had to change the path for the e-mail and the redirect. I thank-you so much :D I guess the extension had that done, but if anyone is reading this sikuneh's advise will work too
    Last edited by ohreally; 05-02-2010 at 03:30 PM.

+ Reply to Thread

Similar Threads

  1. Profile pic feature for my login script - NO CODES NEEDED
    By begamer26 in forum Programming Help
    Replies: 8
    Last Post: 04-03-2010, 06:21 PM
  2. Simple Slideshow script/module needed for CMS
    By stevet70 in forum Programming Help
    Replies: 4
    Last Post: 11-10-2008, 04:10 PM
  3. java script needed
    By tabish3 in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 06-04-2008, 08:57 PM
  4. Script needed for trivia site
    By dwd2000 in forum Programming Help
    Replies: 0
    Last Post: 05-19-2008, 08:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers