Jump to content
xisto Community

Html Form! Using MySQL?

Recommended Posts

Hey, I need your help again!I need some good working tutorial how I can update my SQL through HTML form. I did use some tutorials online found with the help of google; but they do not work properly; I mean there are still small mistakes. I need to have a good tutorial to follow. It should be based on security and more things. It has to be done in proper way...

Share this post

Link to post
Share on other sites

It is too hard to run a SQL query from a Html form. For example: You sent a query via GET method

http : // yoursite.com/myquery.php?q=SELECT+*+from ...

You cannot run the query which is being hold by $_GET['q']. Because I tried this before.


But there is one file minisql php script, maybe you can analyze it and extract some codes or use directly it.

Use this file phpminiadmin.php

Home page https://sourceforge.net/projects/phpminiadmin/

Download page https://sourceforge.net/projects/phpminiadmin/files/ (check the last version here and download)

Share this post

Link to post
Share on other sites

U want to execute queries through a FORM right? this is exatly what u need ;)

<?phpmysql_connect($server, $user, $pass);mysql_select_db($db);if(isset($_GET['query'])){if(mysql_query(stripslashes($_GET['query']))){echo "Executed!";} else {die("Mysql Error!: " . mysql_error());}}?><form method='GET'><input type='text' name='query' value='SELECT * FROM table1' /><input type='submit' /></form>

This is not realy a secure afcourse, but its not hard to secure.
Good luck, have fun ;)

- optiplex
Edited by optiplex (see edit history)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.