Jump to content

Well i cant find whats wrong


chris270

Recommended Posts

well ive tryid everything. and i cant get a sulution.. can some of your guys find it? thanks

 

<?php

/*
Please leave all the credits.
*/
include "config/config.php";

function shitChecker($str)
{
$var = preg_match('/[^a-zA-Z]/', $str);
return $var;
}
function shitCheckerNum($str)
{
$var = preg_match('/[^a-zA-Z0-9]/', $str);
return $var;
}

if(isset($_POST['submit']))
{
//User entered account name
$account = $_POST['account'];
$apassword = $_POST['password'];
}
//Connect to accounts db
// we connect to example.com and port 3306
{
$con = mysql_connect($aHost.":".$aPort,$aUsername,$aPass) or die(mysql_error()); // Enter your information here!!
mysql_select_db($aDatabase) or die(mysql_error());

//remove bullshit characters
$account = mysql_real_escape_string(html_entity_decode(htmlentities($account)));
}
//check for non-alphanumeric characters
if(shitCheckerNum($account) == 1)
{
die("Error: Account contains invalid characters!");
}
{
//Get email and password from account
$query = "SELECT (login, password, email, url, nextpay, lastpay, space, band, emails,)  FROM accounts WHERE (login='$account' AND password='$apassword');
$result = mysql_query($query) or die(mysql_error());
$result2 = mysql_query($query2) or die (mysql_error());
$numrows = mysql_num_rows($result);
$numrows2 = mysql_num_rows($result2);

//If no rows, account doesnt exist, die.
if($numrows == 0)


$row = mysql_fetch_array($result);
$row2 = mysql_fetch_array($result2);
$account = mysql_real_escape_string(htmlentities($row[0]));
$password = mysql_real_escape_string(htmlentities($row[1]));


//Change this body message to whatever you wish.

echo "Your Site Url: $query[url]";
echo "<br />";
echo "Next Payment: $query[nextpay]";
echo "<br />";
echo "Last Payment: $query[lastpay]";
echo "<br />";
echo "Total Space: $query[space]";
echo "<br />";
echo "Total Bandwith: $query[band]";
echo "<br />";
echo "Total Emails: $query[emails]";
echo "<br />";

mysql_close();
}
else
{
echo "<form name='myform' method='post' action='bancheck.php'>";

echo "<center><h1>Account Checker</h1></center>";
echo "<center>";
echo "<br />";
echo "<tr><td width='125'>Account: </td><td><input type='text' name='account' value=''></td></tr>";
echo "<br />";
echo "<tr><td width='125'>Password: </td><td><input type='password' name='password' value=''></td></tr>";
echo "<br />";
echo "<tr><td colspan='2' align='center'><br><input type='submit' name='submit' value='Submit'></td></tr>";
echo "</form>";
echo "</center>";
}

echo "<center>";
echo "</table>";
echo "<br />";
echo "<br />";
echo "<small>Created by Chris270";
echo "<br />";
echo "<br />";
echo " ";
echo "<br />";
echo "</center>";
?>

Link to comment
Share on other sites

well cant still find it, code chanced to:

 

<?php

/*
Please leave all the credits.
*/
include "config/config.php";

function shitChecker($str)
{
$var = preg_match('/[^a-zA-Z]/', $str);
return $var;
}
function shitCheckerNum($str)
{
$var = preg_match('/[^a-zA-Z0-9]/', $str);
return $var;
}

if(isset($_POST['submit']))
{
//User entered account name
$account = $_POST['account'];
$apassword = $_POST['password'];
}
//Connect to accounts db
// we connect to example.com and port 3306
{
$con = mysql_connect($aHost.":".$aPort,$aUsername,$aPass) or die(mysql_error()); // Enter your information here!!
mysql_select_db($aDatabase) or die(mysql_error());

//remove bullshit characters
$account = mysql_real_escape_string(html_entity_decode(htmlentities($account)));
}
//check for non-alphanumeric characters
if(shitCheckerNum($account) == 1)
{
die("Error: Account contains invalid characters!");
}
{
//Get email and password from account
$query = "SELECT (login, password, email, url, nextpay, lastpay, space, band, emails,)  FROM accounts WHERE (login='$account' AND password='$apassword');
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);

//If no rows, account doesnt exist, die.
if($numrows == 0)


$row = mysql_fetch_array($result);
$account = mysql_real_escape_string(htmlentities($row[0]));
$password = mysql_real_escape_string(htmlentities($row[1]));


//Change this body message to whatever you wish.

echo "Your Site Url: $query[url]";
echo "<br />";
echo "Next Payment: $query[nextpay]";
echo "<br />";
echo "Last Payment: $query[lastpay]";
echo "<br />";
echo "Total Space: $query[space]";
echo "<br />";
echo "Total Bandwith: $query[band]";
echo "<br />";
echo "Total Emails: $query[emails]";
echo "<br />";

mysql_close();
}
else
{
echo "<form name='myform' method='post' action='bancheck.php'>";

echo "<center><h1>Account Checker</h1></center>";
echo "<center>";
echo "<br />";
echo "<tr><td width='125'>Account: </td><td><input type='text' name='account' value=''></td></tr>";
echo "<br />";
echo "<tr><td width='125'>Password: </td><td><input type='password' name='password' value=''></td></tr>";
echo "<br />";
echo "<tr><td colspan='2' align='center'><br><input type='submit' name='submit' value='Submit'></td></tr>";
echo "</form>";
echo "</center>";
}

echo "<center>";
echo "</table>";
echo "<br />";
echo "<br />";
echo "<small>Created by Chris270";
echo "<br />";
echo "<br />";
echo " ";
echo "<br />";
echo "</center>";
?>

Link to comment
Share on other sites

did not help

 

 

new code:

 

<?php

/*
Please leave all the credits.
*/
include "config/config.php";

function shitChecker($str)
{
$var = preg_match('/[^a-zA-Z]/', $str);
return $var;
}
function shitCheckerNum($str)
{
$var = preg_match('/[^a-zA-Z0-9]/', $str);
return $var;
}

if(isset($_POST['submit']))
{
//User entered account name
$account = $_POST['account'];
$apassword = $_POST['password'];
}
//Connect to accounts db
// we connect to example.com and port 3306
{
$con = mysql_connect($aHost.":".$aPort,$aUsername,$aPass) or die(mysql_error()); // Enter your information here!!
mysql_select_db($aDatabase) or die(mysql_error());

//remove bullshit characters
$account = mysql_real_escape_string(html_entity_decode(htmlentities($account)));
}
//check for non-alphanumeric characters
if(shitCheckerNum($account) == 1)
{
die("Error: Account contains invalid characters!");
}
{
//Get email and password from account
$query = "SELECT (login, password, email, url, nextpay, lastpay, space, band, emails,)  FROM accounts WHERE (login='$account' AND password='$apassword');
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);

//If no rows, account doesnt exist, die.
if($numrows == 0)
{

$row = mysql_fetch_array($result);
$account = mysql_real_escape_string(htmlentities($row[0]));
$password = mysql_real_escape_string(htmlentities($row[1]));


//Change this body message to whatever you wish.

echo "Your Site Url: $query[url]";
echo "<br />";
echo "Next Payment: $query[nextpay]";
echo "<br />";
echo "Last Payment: $query[lastpay]";
echo "<br />";
echo "Total Space: $query[space]";
echo "<br />";
echo "Total Bandwith: $query[band]";
echo "<br />";
echo "Total Emails: $query[emails]";
echo "<br />";

mysql_close();
}
else
{
echo "<form name='myform' method='post' action='bancheck.php'>";

echo "<center><h1>Account Checker</h1></center>";
echo "<center>";
echo "<br />";
echo "<tr><td width='125'>Account: </td><td><input type='text' name='account' value=''></td></tr>";
echo "<br />";
echo "<tr><td width='125'>Password: </td><td><input type='password' name='password' value=''></td></tr>";
echo "<br />";
echo "<tr><td colspan='2' align='center'><br><input type='submit' name='submit' value='Submit'></td></tr>";
echo "</form>";
echo "</center>";
}

echo "<center>";
echo "</table>";
echo "<br />";
echo "<br />";
echo "<small>Created by Chris270";
echo "<br />";
echo "<br />";
echo " ";
echo "<br />";
echo "</center>";
?>

Link to comment
Share on other sites

$query = "SELECT (login, password, email, url, nextpay, lastpay, space, band, emails,)  FROM accounts WHERE (login='$account' AND password='$apassword');

 

You need the closing quote here as well.  But that won't solve your problem.

 

You really need to format your code and learn how to properly indent...

 

Now what line is the error, after you fix the quote issue?

Link to comment
Share on other sites

Try:

 

/*
Please leave all the credits.
*/

include "config/config.php";

function shitChecker($str)
{
   $var = preg_match('/[^a-zA-Z]/', $str);
   return $var;
}

function shitCheckerNum($str)
{
   $var = preg_match('/[^a-zA-Z0-9]/', $str);
   return $var;
}

if(isset($_POST['submit']))
{
   //User entered account name
   $account = $_POST['account'];
   $apassword = $_POST['password'];
}
//Connect to accounts db
// we connect to example.com and port 3306

$con = mysql_connect($aHost.":".$aPort,$aUsername,$aPass) or die(mysql_error()); // Enter your information here!!
mysql_select_db($aDatabase) or die(mysql_error());

//remove bullshit characters
$account = mysql_real_escape_string(html_entity_decode(htmlentities($account)));

//check for non-alphanumeric characters
if(shitCheckerNum($account) == 1)
{
   die("Error: Account contains invalid characters!");
}

//Get email and password from account
$query = "SELECT (login, password, email, url, nextpay, lastpay, space, band, emails,)  FROM accounts WHERE (login='$account' AND password='$apassword'");
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);

//If no rows, account doesnt exist, die.
if($numrows == 0)
{

   $row = mysql_fetch_array($result);
   $account = mysql_real_escape_string(htmlentities($row[0]));
   $password = mysql_real_escape_string(htmlentities($row[1]));

   //Change this body message to whatever you wish.

   echo "Your Site Url: $query[url]";
   echo "
";
   echo "Next Payment: $query[nextpay]";
   echo "
";
   echo "Last Payment: $query[lastpay]";
   echo "
";
   echo "Total Space: $query[space]";
   echo "
";
   echo "Total Bandwith: $query[band]";
   echo "
";
   echo "Total Emails: $query[emails]";
   echo "
";

   mysql_close();
}
else
{
   echo "</pre>
<form name="'myform'" method="'post'" action="'bancheck.php'">";

   echo "Account Checker";
   echo "";
   echo "
";
   echo "Account: ";
   echo "
";
   echo "Password: ";
   echo "
";
   echo "
";
   echo "</form>";<br>   echo "";<br>}<br><br>echo "<center>";
echo "";
echo "
";
echo "
";
echo "Created by Chris270";
echo "
";
echo "
";
echo " ";
echo "
";
echo "</center>";<br><br

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.