undefined GET id?

Posted by Azzyh on Stack Overflow See other posts from Stack Overflow or by Azzyh
Published on 2010-05-13T10:26:55Z Indexed on 2010/05/13 10:34 UTC
Read the original article Hit count: 123

Filed under:
|
|
 <?php
$s = $_GET["s"];
if($s) {
$hent_b = mysql_query("SELECT * FROM member_battles WHERE state = '1' ORDER BY id DESC LIMIT 0,200") or die(mysql_error());
}else{
$hent_b = mysql_query("SELECT * FROM member_battles WHERE state = '0' ORDER BY id DESC LIMIT 0,200") or die(mysql_error());
}
while($vis = mysql_Fetch_array($hent_b)) {
 ?> 

I have this now i want when i enter my site (index.php) it should not come up undefined $_GET["s"];

how do i do this? but i want when you do index.php?s then it should change the query

© Stack Overflow or respective owner

Related posts about php

Related posts about get