Modifications in php

Posted on 2009-02-12
Medium Priority
Last Modified: 2012-05-06
I have downloaded an open source file for login purpose but finding difficulties to make changes as per the given instructions which says "Copy the following SQL to create a table and structure" but since theres nothing mentioned about where to paste please can somebody help me here? I have pasted the code below for your reference.

CREATE TABLE `users` (
`id` int(20) NOT NULL auto_increment,
`full_name` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_name` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_pwd` varchar(200) collate latin1_general_ci NOT NULL default '',
`user_email` varchar(200) collate latin1_general_ci NOT NULL default '',
`activation_code` int(10) NOT NULL default '0',
`joined` date NOT NULL default '0000-00-00',
`country` varchar(100) collate latin1_general_ci NOT NULL default '',
`user_activated` int(1) NOT NULL default '0',

Open in new window

Question by:Jeffreym17
  • 2
  • 2

Expert Comment

ID: 23623891
That is the sql to create a table, but you first have to make a connection to a database first.

First you have to decide what type of database to use (mssql, mysql etc), set one up or find one to use, then set up the connections.

Then you run the query in PHP, but it differs depending on the type of database.

Author Comment

ID: 23624522
Hello pandalandaland,

I have the knowledge of your first two lines above... but please can you elaborate your last line?


Accepted Solution

pandalandaland earned 1500 total points
ID: 23624713
Well to run the query you run the query command for whatever database you use. For example, mysql:

mysql_connect( "hostname", "db_username", "db_password");

//$theQuery =  that query you are trying to run


Author Comment

ID: 23639965
I have created MySQL database but please can you tell me where to run this query command? I mean the exact location to run the query.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When sharing photos, especially via e-mail, the large resolution images that most cameras take today make for extremely large file sizes. The time required to upload these files to forums, send in e-mails, post to blogs or even placi…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
In this tutorial viewers will learn how to correct colors in Photoshop using the Color Balance adjustment Open a photo for editing in Photoshop: Open a photo for editing in Photoshop: Select "OK" on the dialogue: The Color Balance adjustment works b…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question