• 0

[PHP] Blank Page


Question

7 answers to this question

Recommended Posts

  • 0

<?php
$username="******";
$password="puppypuppy";
$database="*******";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$last = $_COOKIE['ID_my_site']; 

$query = "SELECT*FROM wings, users where wings.Numero = users.Wing AND users.username = '" . $last ."';";

$query2 = "SELECT Wing From users where users.Wing = 0;";

$result = mysql_query($query);
$result2 = mysql_query($query2);

<?----soooooo lost----------->

$sql = "INSERT INTO wings (CC1, GB1, Radar1, Runway1, Factory1, NP1, Residence1, PP1, Oil1)
VALUES ($_POST[1], $_POST[2], $_POST[3], $_POST[4], $_POST[5], $_POST[6], $_POST[7], $_POST[8]);";  

$result = mysql_query($sql)or die ("Error. Could not do SQL query!");








<?---form starts here--->

<form action="<?php echo $PHP_SELF; ?>" method="post">



<?--------pray for a miracle--->

Your code has so many issues that I dread even trying to fix them all...

You didn't close your PHP tag, you're using PHP tags instead of comment tags, and you aren't escaping variables. NO **** it doesn't work, lol...

Try this.

<?php
$username="******";
$password="puppypuppy";
$database="*******";

mysql_connect('localhost',$username,$password);
mysql_select_db($database) or die( "Unable to select database");

$last = $_COOKIE['ID_my_site'];

$query = "SELECT * FROM users INNER JOIN wings ON users.Wing = wings.Numero WHERE users.username = '{$last}'";

$query2 = "SELECT Wing FROM users where users.Wing = '0'";

$result = mysql_query($query);
$result2 = mysql_query($query2);

/*soooooo lost*/

$sql = "INSERT INTO wings (CC1, GB1, Radar1, Runway1, Factory1, NP1, Residence1, PP1, Oil1)
VALUES ({$_POST[1]}, {$_POST[2]}, {$_POST[3]}, {$_POST[4]}, {$_POST[5]}, {$_POST[6]}, {$_POST[7]}, {$_POST[8]})"; 

$result = mysql_query($sql)or die ("Error. Could not do SQL query!");

?>
<!--form starts here-->

<form action="<?php echo $PHP_SELF; ?>" method="post">

<!--pray for a miracle-->

Link to comment
https://www.neowin.net/forum/topic/700372-php-blank-page/#findComment-590165800
Share on other sites

  • 0
Maybe im tired, but i fail to see what you're doing here.

$query2 = "SELECT Wing FROM users where users.Wing = '0'";

if you know the value is 0, why are you looking it up?

Frankly I was not sure why he's running either of the first two queries. But I didn't make it my job to question it, just to make his broken code work.

Link to comment
https://www.neowin.net/forum/topic/700372-php-blank-page/#findComment-590166102
Share on other sites

  • 0
Wow... I started looking at it and when I got to the point where your using php tags for a comment, I just stopped and gave up.

ditto. not to be mean though, it's just probably easier to rewrite rather than fix the current code, and as i'm not exactly sure what they want, it's difficult to accomplish that. good luck to OP though, hopefully you can get it figured out!!

Link to comment
https://www.neowin.net/forum/topic/700372-php-blank-page/#findComment-590171288
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Age 16, old enough to get a full-time job, your own bank account, a passport, get married, even join the military and go to war. But talking to your friends on the internet? Oh hell no!
    • I remember when all games had demos; it was a normal thing, not a limited time promotion.
    • Forza Horizon 6 gets big bug-fixing and balancing update by Taras Buria Today, Playground Games released a big Forza Horizon 6 update with a long list of fixes, patches, and balancing tweaks that the studio promised earlier. Version 375.327 is now available on Steam, Microsoft Store, and Xbox, offering users improvements for AI, audio, design, performance, road discovery, upgrades, visuals, online play, and more. Some of the most notable changes in the Series 2 update include rebalanced drivatars, particularly their difficulty and race start behavior. As such, the game should be more balanced on higher difficulty levels, and AI cars should not shoot out when the race starts as if they have rocket boosters. Speaking of difficulty, developers nerfed Drag Tires physics for a more expected and realistic behavior. They are no longer the go-to option for record-breaking times in road racing, and all leaderboard entries with drag tires will be removed. Completionists will also be glad to get a new feature that lets you see road discovery percentage in each region, which should make discovering all roads easier while keeping it quite challenging and interesting (I spent quite a long time finding the last road). Festival Playlist is also getting some much-needed fixes, including patches for bugs that allowed completing Seasonal Jobs ahead of time or where weekly challenges would not unlock for some players. Developers will retroactively give reward points to all who could not complete all challenges due to these bugs. Other changes include changes to Horizon Play progression so that it is easier to reach Level 100, audio improvements on lower-spec devices, fixes for visual glitches, including pixelated smoke, and more. Developers also addressed the currently non-working Eliminator, an online mode gamers used to farm credits with a Hummer EV exploit. Playground Games plans to re-enable it soon. As a gesture of goodwill, players will get a free McLaren Sabre. Those who used the exploit will not be banned, but developers plan to roll back credits to a maximum of 10M for all who farmed credits using the exploit. You can find the complete changelog for the latest Forza Horizon 6 update here.
    • "Samsung is shutting down yet another app used by millions" I will fix the clickbait title for you, free-of-charge: "Samsung shutting down it's Max VPN app"
  • Recent Achievements

    • First Post
      Cosminus earned a badge
      First Post
    • One Year In
      ThatGuyOnline earned a badge
      One Year In
    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      483
    2. 2
      +Edouard
      187
    3. 3
      PsYcHoKiLLa
      122
    4. 4
      Steven P.
      85
    5. 5
      neufuse
      73
  • Tell a friend

    Love Neowin? Tell a friend!