Jump to content

Making a Page to add users to MySQL


CrackCar101

Recommended Posts

MySQL Version: 5.5.20 (<-- This is my WAMPServer version to test my program, my hosting has 5.1 though)

PHP Version: 5.3.10 (My Hosting says its PHP 5 but not sure what version, i know its not the newest)

 

What im trying to do is have my site have a page like "www.mysite.com/data.php?user=Nicholas&country=USA"

 

Thing is, i dont know what to add in my data.php source code to make it work like that. What im trying to achieve is for my users to sign up for my page but I DO NOT want to add my MySQL user and pass in the page where it can be cracked and hacked. When the user goes to the page, a script will automatically put the user and country and then the page will automatically add the user and his country to the MySQL table on my database.

 

Im also making a program that will work like this and that will have a higher chances of being hacked if i add my MySQL info into the program in order to add data.

 

Can someone please provide me of a sample source i can try? I will not only be adding user and country but i want to test this out.

 

Thanks!

 

 

Link to comment
Share on other sites

At some point your going to need to include the username and password in order to connect from PHP... If you don't you can't connect.

 

Moreover, PHP will execute before the page is output so unless you decide to print your sensitive data, your information should never be seen...

Link to comment
Share on other sites

At some point your going to need to include the username and password in order to connect from PHP... If you don't you can't connect.

 

Moreover, PHP will execute before the page is output so unless you decide to print your sensitive data, your information should never be seen...

 

But cant i just have a script that whatever info is put here: www.mysite.com/data.php?user=(USER)&country=(COUNTRY)

Cant it just send the info to MySQL.

Link to comment
Share on other sites

You login to your computer using a username and password. You access your emails using a username (email) and password. The same principle applies to a MySQL Server. You login with a username and password, then you can access the data (provided there are appropriate permissions).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.