Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Html Form!, Using MySQL?!
alex1985
post May 24 2008, 10:08 AM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



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...
Go to the top of the page
 
+Quote Post
alex1985
post Jun 10 2008, 06:02 PM
Post #2


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



Please, post any replies to help me?!
Go to the top of the page
 
+Quote Post
Erdemir
post Jun 10 2008, 11:00 PM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 217
Joined: 12-May 08
From: Istanbul, Turkey
Member No.: 62,045



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 http://sourceforge.net/projects/phpminiadmin/
Download page http://sourceforge.net/project/showfiles.php?group_id=181023 (check the last version here and download)
Go to the top of the page
 
+Quote Post
alex1985
post Jun 11 2008, 11:53 AM
Post #4


Super Member
*********

Group: [HOSTED]
Posts: 397
Joined: 9-February 08
Member No.: 57,615



Any more replies? This forum is intended to help people as well as to teach them!!!
Go to the top of the page
 
+Quote Post
optiplex
post Jun 27 2008, 08:25 PM
Post #5


Newbie [Level 3]
***

Group: [HOSTED]
Posts: 40
Joined: 26-June 08
Member No.: 64,213



U want to execute queries through a FORM right? this is exatly what u need biggrin.gif

CODE
<?php
mysql_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 smile.gif

- optiplex

This post has been edited by optiplex: Jun 27 2008, 08:26 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Problem On Mysql "order By"(5)
  2. Php News Script(19)
  3. Increment A Mysql Column(7)
  4. Can You Add Images Into A Mysql Database?(20)
  5. Subquery In Mysql(5)
  6. Adapting Html Code Embed To Work On Phpnuke(7)
  7. Creating Profiles In Php/mysql ?(7)
  8. Php Search Engine Script For Mysql Database(11)
  9. Some Mysql Basics(4)
  10. Getting Php 5 To Work With Mysql(0)
  11. Problem With A Mysql Join(2)
  12. The Artists Tutorials :mysql Basic Commands(0)
  13. Script To Translate Into Bbcode From Html Tags(1)
  14. Html Site With Login(2)
  15. Html Code Tester. Online Script(15)
  1. File Checker-how To Check File Whith Html Through Html?(2)
  2. [mysql]get Id Of Loged In User?(7)
  3. [mysql/php]need Som Basic Help(13)
  4. [php/mysql]id Trouble [resolved](3)
  5. Mysql Won't Update(4)
  6. Php + Mysql Question!(4)
  7. Tools Needed!(9)
  8. Best Sites For Learning Php-mysql(4)
  9. How Do I Get The Result To "stick" And Add Html Tags?(14)
  10. Php And Mysql Programming(2)
  11. Best Php And Mysql Editor For Noobs(6)
  12. Mysql Error(3)
  13. Create Table - Mysql Code - Help(1)


 



- Lo-Fi Version Time is now: 12th October 2008 - 05:21 PM