How can i use a button with php? -
how can use button or form php?
<button formmethod="get" neme="1" type="button">click</button> <?php if ($_get["1"]) { require_once "0000.php"; $query = mysql_query("select * op"); while ($rwo = mysql_fetch_object($query)) { $rwo-> id; } } ?>
an error shown. trying if clicks on button, results show up.
- typo
neme="1"
shouldname="1"
- i think still need
<form>
tag wrapped around button - you'll want
echo $rwo->id;
see results - use
isset
avoid undefined index notices - use input
type="submit"
instead oftype="button"
<form> <button formmethod="get" name="1" type="submit">click</button> </form> <?php if (isset($_get["1"])) { require_once "0000.php"; $query = mysql_query("select * op"); while ($rwo = mysql_fetch_object($query)) { echo $rwo->id; } } ?>