Jump to content

Running SQL statement from Link


leachus2002

Recommended Posts

Hi There,

 

I was wondering if there was any way that I can script, when I click on a link, for example "delete post" button, it will execute an sql statement and refresh the page? Could it be done in a way that if, say, the "$_GET['variable'] was blank, that the statement would not run?

 

I am looking for ideas :)

 

Cheers

Matt

Link to comment
https://forums.phpfreaks.com/topic/205038-running-sql-statement-from-link/
Share on other sites

It sounds like a simple verification...

Are you going to use it in a form?

if so,

<form action="processor.php" onSubmit="validate_field($field)">

function validate_field($field){
if ($field=<0);
echo 'Field is empty';
else ($field=>0);
echo 'field is not empty'
}

Or just do it vice-verse

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.