Php/mysql Help:how To Run Sql Query From A Link - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Php/mysql Help:how To Run Sql Query From A Link (7088 Views)
| Php/mysql Help:how To Run Sql Query From A Link by GoodMuyis(op): 5:44pm On Oct 07, 2011 |
Hello friend I need some help on How i can Execute sql query from a link as in :
Where the link will point to PHP file and at end echo[/b]some stuff out please attach some cash of code to your answer to help me much while i keep Goooogling What i really want to do is display row of result like below Name | ID | ================== Shola |256 | Edit John | 128 |Edi Here Edit will be a link [b]<a>Edit</a> to a PHP page Where the result will be handle by html form, Which Am sure i can handle Regards |
| Re: Php/mysql Help:how To Run Sql Query From A Link by dellnet: 6:20pm On Oct 07, 2011 |
You can pass querystring to your php file. For example you <a href="http://example.com/phpfile.php?q=shola">click here to get shola's id</a> in the php file you do $query_from_a = $_REQUEST['q']; $sqlquery= "SELECT ID FROM table_name WHERE Name='".$query_from_a."'"; |
| Re: Php/mysql Help:how To Run Sql Query From A Link by Mobinga: 1:25am On Oct 08, 2011 |
| Re: Php/mysql Help:how To Run Sql Query From A Link by GoodMuyis(op): 11:18am On Oct 08, 2011 |
dell_net: Mobinga:Thank You guys for the help all work well my Own code below
|
| Re: Php/mysql Help:how To Run Sql Query From A Link by Mobinga: 11:49am On Oct 08, 2011 |
Be careful, always use mysqli_real_escape_string(); to escape your data. Somebody can just do this goodmuyis.com/mysql.php?q=DROP%20DB; |
| Re: Php/mysql Help:how To Run Sql Query From A Link by GoodMuyis(op): 2:57pm On Oct 08, 2011 |
Mobinga:Yea thank you i won't play with that, even thought i don;t care much about the project |
| Re: Php/mysql Help:how To Run Sql Query From A Link by dellnet: 4:47am On Oct 09, 2011 |
<a href='updateEntry.php?edit=$getReport[studentID] ?where did you get with it? |
| Re: Php/mysql Help:how To Run Sql Query From A Link by GoodMuyis(op): 10:59am On Oct 11, 2011 |
dell_net:The above is from my project Code file although written badly Pls Guys is OK to do SQL Query(MySQL) like this from PHP although i have not tried it " $search = $_POST['search']; |
| Re: Php/mysql Help:how To Run Sql Query From A Link by dellnet: 1:44pm On Oct 11, 2011 |
GoodMuyis:Be wary of security issues if you are deploying it to the internet. |
How To Make a DESKTOP Executable Software Using PHP,MYSQL,SQLITE • Urgent Help On Sparql Query Ontology • Trying To Run Php Project After Installing Wamp Server • 2 • 3 • 4
Pattern Chaser In Javascript: Coding Challenge • Sorting Out A Simple Text Dictionary With PHP • New Private Spamming Tutorials 2016 + Tools + Video
;
?