Page 1 of 1
resources overusage
Posted: Mon Jun 18, 2012 1:20 pm
by mohammedsalah
hi ,
when i try to open my website it says "This Account Has Been Suspended"
that was a day after i launched "application form" to my website
app1.php (dropdownlist shows X ftom my database) submit >>app2.php
app2.php (dropdownlist show Y dependent on the X choice) submit>>app3.php
app3.php (dropdownlist show Z dependent on the X & Ychoice) submit>>app4.php
app4.php (contact form) submit>>app5.php
app5.php (thank u msg , updates database with( X , Y and Z) , and sends email with form)
i made the form like this because i was in hurry and i dont know ajax
arround 40 person has filled the forms and i got emails .
is that form the cause of the resources overusage which lead to This Account Has Been Suspended" ??
Re: resources overusage
Posted: Mon Jun 18, 2012 1:29 pm
by Celauran
You'd do better to ask your hosting provider why your account was suspended.
Re: resources overusage
Posted: Mon Jun 18, 2012 1:59 pm
by mohammedsalah
i cant contact them til tommorrow and i will ask them ofcourse , but my question was about that form
Re: resources overusage
Posted: Mon Jun 18, 2012 2:12 pm
by Celauran
Based on your description, it seems unlikely. Best I can tell you without seeing the code. Even seeing the code, I could only speculate whereas your hosting provider will be able to tell you for certain.
Re: resources overusage
Posted: Mon Jun 18, 2012 2:34 pm
by mohammedsalah
App1.php
Code: Select all
$con = mysql_connect("localhost","","");
$result=@mysql_query("select distinct committe from database_name.apps where available='yes' ORDER BY committe");
echo"<form action='app2.php' method='POST'>";
print "<select name=committe>\n";
while($row=mysql_fetch_assoc($result))
{
$committe=$row['committe'];
print"<option value=\"{$committe}\">{$committe}";
}
print"</select>\n";
echo'<input type="submit"/>';
echo'</form>';
$committe = mysql_real_escape_string($_POST['committe']);
mysql_close($con);
?>
app2.php
Code: Select all
<?php
$con = mysql_connect("localhost","","");
$result=@mysql_query("select distinct day from database_name.apps where committe='$committe' order by available");
echo"<form action='app3.php' method='POST'>";
print "<select name=committe>\n";
print"<option value=\"{$committe}\">{$committe}";
print"</select>";
print"<br>";
print"<br>";
print "<select name=day>\n";
while($row=mysql_fetch_assoc($result))
{
$day=$row['day'];
print"<option value=\"{$day}\">{$day}";
}
print"</select>\n";
echo'<input type="submit"/>';
echo'</form>';
$committe=$_POST['committe'];
$day = mysql_real_escape_string($_POST['day']);
mysql_close($con);
?>
app3.php
Code: Select all
<?php
$con = mysql_connect("localhost","_app","");
$result=@mysql_query("select app from database_name.apps WHERE( committe='$committe' AND day='$day' AND available='yes') ");
echo"<form action='app4.php' method='POST'>";
print "<select name=committe>\n";
print"<option value=\"{$committe}\">{$committe}";
print"</select>";
print"<br>";
print"<br>";
print "<select name=day>\n";
print"<option value=\"{$day}\">{$day}";
print"</select>";
print"<br>";
print"<br>";
print "<select name=appointment>\n";
while($row=mysql_fetch_assoc($result))
{
$appointment=$row['app'];
print"<option value=\"{$appointment}\">{$appointment}";
}
print"</select>\n";
echo'<input type="submit"/>';
echo'</form>';
$appointment = mysql_real_escape_string($_POST['appointment']);
echo $appointment;
$committe=$_POST['committe'];
$day=$_POST['day'];
mysql_close($con);
?>
app4.php just html / JS form
app5.php
Code: Select all
<?php
$con = mysql_connect("","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database_name", $con);
mysql_query("update database_name.apps set available='no' where (committe='$committe' AND day='$day' AND app='$appointment') ");
mysql_close($con);
$ToEmail = 'my_email@yahoo.com';
$EmailSubject = 'application';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY .="## committe: " .$_POST['committe']."";
$MESSAGE_BODY .="## day: " .$_POST['day']."";
$MESSAGE_BODY .="## appointment: " .$_POST['appointment']."";
$MESSAGE_BODY .="## Name: " .$_POST['Name']."";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
Thank you
i know this is bad , and there is 1000 ways to make it better but im newbie and need any kind of advice
thanks
