PHP - Moved: Select Where Id Equals
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=310935.0 Similar TutorialsThis topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=349596.0 Hello all, Just a quick one here, I'm not sure what to put in the quotations of an if statement if I want to say if value equals ANYTHING. Thanks $test = substr_count($_POST['signature'], '>'); $test1 = substr_count($_POST['signature'], '<'); if ($_SESSION['logged_in'] != '1') { static $the_echo = 'You need to be logged in!'; } elseif ($_POST['change_box2'] != 'CHANGE') { static $the_echo = 'You must fill in the "CHANGE" box!'; } elseif ($test != '0') { static $the_echo = 'Contains illegal characters!'; } elseif ($test1 != '0') { static $the_echo = 'Contains illegal characters!'; } } echo $_POST['signature']; echo $test; ?> Those two echos a few lines above (echo $_POST['signature']; and echo $test;) come out to The Little Android and 0 yet it still echos illegal characters...what? i have this code <?php $rulepages = array(); $rulepages[] = array("name" => "1111213", "page" => "fasdd21.php", "id" => "1"); $rulepages[] = array("name" => "41231245152", "page" => "fasd.php", "id" => "2"); ?> <table width="100%"> <tr> <td width="15%"> <?php sort($rulepages); foreach($rulepages AS $rulepage){ echo "<a href=\"?id=".$rulepage["id"]."\">".$rulepage["name"]."</a>"; echo "<br />"; } ?> </td> <td width="80%"> <?php $id = $_GET["id"]; // ?? ?> </td> </tr> </table> what do i do to search the array where the id equals the get ? thanks Hi,
I'm using an example below regarding a whole URL. I'm looking for some conditional PHP that will display certain content depending on if the URL contains the word 'liz' if not, display else.
$host = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; if($host == 'liz-4.website.com') This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=320341.0 This topic is now in MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=357554.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=357712.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=343149.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=350716.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=348848.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=359241.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347920.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313023.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309828.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=305968.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=322930.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=348309.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=356136.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347324.0 |