Jump to content

*SOLVED* PHP doesn't obey me


turbocueca

Recommended Posts

[code]<?php
    if (isset($_POST['query'])) {
                $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE name LIKE '%$query%' OR system LIKE '%$query%' OR postedby LIKE '%$query%'"),0);
                if ($total_results!=0) {
                echo '<span class="style79">Searched results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span'; } else { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } }
                
    elseif (isset($_POST['select'])) {
                if ($_POST['select']="today") {
                $now=date(dmy);    
                $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE ins_date LIKE $now"),0);
                if ($total_results!=0) {
                echo '<span class="style79">Filtered results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span>'; } else { if (!isset($_POST['select'])) { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } } } }
                
                else {
                $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM usbextreme WHERE system LIKE '$filter' OR work_status LIKE '$filter'"),0);
                if ($total_results!=0) {
                echo '<span class="style79">Filtered results:</span> <span class="style80">'.$total_results.' - <a href="index.php">Reset</a></span>'; } else { echo '<span class="style79">No results</span> - <a href="index.php">Reset</a>'; } }
?>
[/code]

[a href=\"http://infocenter.awardspace.com/inter/ps2ub/index.php\" target=\"_blank\"]http://infocenter.awardspace.com/inter/ps2ub/index.php[/a]

If you enter this link, you will find something at the bottom of the page like this "No results - Reset", that shouldn't be there without searching the db or using the filter. For any reason, I'm not being able to make it disappear. Please check the code.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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