Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7527771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:11:20+00:00 2026-05-30T04:11:20+00:00

<?php $ip = htmlspecialchars($_GET[ip]); $serverIp = a; $a = a; include(mysql.php); $votes = serverVotes;

  • 0
 <?php
$ip = htmlspecialchars($_GET["ip"]);
$serverIp = "a";
$a = "a";
include("mysql.php"); 
$votes = "serverVotes";
$results = mysql_query("SELECT * FROM toplist WHERE serverIp = $_POST[serverIp] ORDER BY $votes DESC");

  if($row['serverIp'] = $_POST[serverIp]) {
        echo 'Yes1.'; //debugging
}
  if($row['serverIp'] != $_POST[serverIp]) {
        echo 'No1.'; //debugging
}

    while($row = mysql_fetch_array($results)){

  if($row['serverIp'] = $_POST[serverIp]) {
        echo 'Yes2.'; //debugging
}
  if($row['serverIp'] != $_POST[serverIp]) {
        echo 'No2.'; //debugging
}

    }
?>

I’m trying to make it, so that if “serverIp” exists in the database, it will echo certain information, and if it doesn’t exists, it will just do nothing. I don’t think it is
actually getting the IP from the form, but I may be wrong, it may be some other problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:11:22+00:00Added an answer on May 30, 2026 at 4:11 am

    have you tried this?

    $ip = htmlspecialchars($_GET["ip"]);
    $serverIp = "a";
    $a = "a";
    include("mysql.php"); 
    $votes = "serverVotes";
    $results = mysql_query("SELECT * FROM toplist WHERE serverIp = '".$_POST['serverIp']."' ORDER BY $votes DESC");
    $row = mysql_fetch_array($results);
    
      if($row['serverIp'] === $_POST['serverIp']) {
            echo 'Yes1.'; //debugging
    }
      if($row['serverIp'] != $_POST['serverIp']) {
            echo 'No1.'; //debugging
    }
    
        while($row = mysql_fetch_array($results)){
    
      if($row['serverIp'] === $_POST['serverIp']) {
            echo 'Yes2.'; //debugging
    }
      if($row['serverIp'] != $_POST['serverIp']) {
            echo 'No2.'; //debugging
    }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php $id = intval($_GET['id']); $sql = mysql_query(SELECT username FROM users WHERE id = $id);
In PHP it's possible to have arrays in $_GET , $_POST , $_COOKIE ,
Is php htmlspecialchars safety for JS? var jsVar = <?php echo(str_replace(array(\r\n, \n,\r), \\n,htmlspecialchars($_GET['p'], ENT_QUOTES)));
I'm getting a blank page with this code: session_start(); include config.php; $af = $_GET['id'];
I have this little function function makewindows(){ child1 = window.open (about:blank); child1.document.write(<?php echo htmlspecialchars(json_encode($row2['ARTICLE_DESC']),
I am trying to figure out how to retrieve data from a MySQL database
How do I run the PHP function htmlspecialchars() on an array of array objects?
I am moving some code from SimpleXML to PHP's DOM and don't quite get
I have a PHP page that will collect mp3 links from downloads.nl. The result
I'm trying to use a select list to actively filter the results I get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.