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 8903021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:45:49+00:00 2026-06-15T01:45:49+00:00

Had this all working with html. Then I tried making it into html5 and

  • 0

Had this all working with html. Then I tried making it into html5 and I’m coding some of my first css code. The only thing I’m tackling right now is why isn’t my image showing?? I’m using google chrome btw. The code passed in the url is this: “?fname=raichu&yesorno=true%2F” And there is no image tag in my generated html :/ I’m assuming that the if statement is equating to false??

<!DOCTYPE HTML>
<html>
<head>

<style type="text/css"> 

 td{
    text-align: center;
    padding:15px;
    background-color:black;
    color:#00FF00;}

 th{
    background-color:black;
    color:yellow}

</style>

         <title>Search Results</title>

</head>

    <body style="color:#FFFFFF"> 

<?php

$dbhost = 'server';
$dbname = 'database1';
$dbuser = 'me';
$dbpass = 'password';

$link = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname);

mysqli_select_db($link,$dbname);

$naame = $_GET["fname"];


if( $_GET["yesorno"] == 'true' OR !$_GET["yesorno"])
            {$query = sprintf("SELECT image_url, Type 
                               FROM Pokemon c 
                               WHERE c.name='%s'", mysqli_real_escape_string($link,$naame));

    $result = mysqli_fetch_assoc(mysqli_query($link,$query));

    echo '<img height="450" width="330" src="'.$result['image_url'].'" alt="blue"/>';}

$res = mysqli_query($link,"SELECT Name,HP,Type,Pokedex_Number AS 'Pokedex  Number',Weakness,Resistance,Retreat AS 'Retreat Cost' 
                           FROM Pokemon 
                           WHERE Pokedex_Number!=0 AND name='$naame'");

if (!$res) {
    die("Query to show fields from table failed");}

    $fields_num = mysqli_num_fields($res);

echo "<h1>Stats</h1>";
echo "<table border='1'><tr>";

// printing table headers
for($i=0; $i<$fields_num; $i++)
{$field = mysqli_fetch_field($res);
echo "<th>{$field->name}</th>";}

echo "</tr>\n";

// printing table rows
while($row = mysqli_fetch_row($res))
{
echo "<tr>";

// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
    echo "<td>$cell</td>";

echo "</tr>\n";
}   

echo "</table>";

mysqli_close($link);

    ?>

<br />
<form method="link" 
action = "http://engr.oregonstate.edu/~bainro/welcome.php" ><input 
type="submit" value="(>O.O)>RETURN<(O.O<)"></form>
<p></p>

    </body>

</html>
  • 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-06-15T01:45:50+00:00Added an answer on June 15, 2026 at 1:45 am

    The variable you are retrieving from the url, is never evaluating to true because ‘%2F’ is a forward slash. Check your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Had a nice PHP/HTML/JS prototype working on my personal Linode, then tried to throw
I had this working at some point, as I had a question about this
Ok, so I had this working just fine before making a few controller additions
I had this site working outside of ruby on rails and then I moved
I am working on this code below and have had a stab at writing
I have had a look about the site and found some code and tried
I've had a bit of trouble finding any information on this and all the
hope all is swell! I was hoping I had cracked this problem but it
Had this working; at one stage. The problem is the following text is now
I had this, which was working fine: public static Integer[] photos = new Integer[]

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.