As I can execute an instruction SQL using onclick?
<input type="hidden" name="q" value>
<input type="submit" value="«" onClick="form.q.value=<?
$result=mysql_db_query("auth","select * from Personal order by Nombre Asc");
?>">
<input type="submit" value="»" onClick="form.q.value=<?
$result=mysql_db_query("auth","select * from Personal order by Nombre Desc");
OnClick
Moderator: General Moderators
.......and also, PHP isn't JavaScript!!
OnClick="" can only trigger JavaScript.
Do something like this..
OnClick="window.location.href=('update.php?VAR=VALUE')" .. and then get the PHP script to send the user back to the page they were on.
However.. you may need to write the JavaScript using PHP to get the variables you want..
It's a good idea to learn JavaScript & PHP before you start mixing the two together!
OnClick="" can only trigger JavaScript.
Do something like this..
OnClick="window.location.href=('update.php?VAR=VALUE')" .. and then get the PHP script to send the user back to the page they were on.
However.. you may need to write the JavaScript using PHP to get the variables you want..
Code: Select all
<?php
echo("OnClick="window.location.href=('update.php?VAR=$VALUE')"");
?>It's a good idea to learn JavaScript & PHP before you start mixing the two together!