Jump to content

mforan

Members
  • Posts

    143
  • Joined

  • Last visited

    Never

Everything posted by mforan

  1. Hi there, im having bit of a problem with this foreach.... as far as i can see i think its right? no doubt something is horribly wrong... lol. anyone have any idea? (post email would be for example "[email protected], [email protected]") ((which makes sense since this SHUD be arrayable???)) <?php $emails = preg_replace("[^a-z0-9\@\.\_\-]", "", $_POST["email"]); $emailArray = explode(",",$emails); foreach($emailArray As $emails[0]){ $query = "SELECT count(email) FROM buddyp WHERE email='$emails[0]'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $emailc = mysql_fetch_array($result, MYSQL_NUM); if ($emailc[0] == 0) { $query = "INSERT INTO buddyp SET email='$emails[0]',day='".time()."'"; mysql_query($query) or die("Error: ".mysql_error()); // message $message = 'EMAIL CONTENTS'; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: Ambroid <[email protected]>' . "\r\n"; // Mail it mail($emails[0], "AMBROID - The War Game", $message, $headers); $exc = "Emails were sent to: $emails[0]"; } else { $exc = "ERROR: You cannot invite the same person to the game within a 3 day period!"; } } ?>
  2. that works just means you have to write something like this: <?php $findme= 'Hacking'; $hacking = strpos($info[92], $findme); $findme= 'Farming'; $farming = strpos($info[92], $findme); $findme= 'Multiple Accounts'; $multiple = strpos($info[92], $findme); $findme= 'Glitch abuse'; $glitch = strpos($info[92], $findme); $findme= 'Verbal Abuse'; $verbal = strpos($info[92], $findme); $findme= 'Proxy'; $proxy = strpos($info[92], $findme); $findme= 'Other'; $other = strpos($info[92], $findme); if ($hacking !== false) {$reason = "Banned for hacking into someone elses account and/or farming/deleting the user.";} if ($farming !== false) {$reason = "Banned for merging two or more of your accounts together into one account.";} if ($multiple !== false) {$reason = "Having more than one account constitutes an immediate ban of all the users account's. If you feel this has happened unjustly, contact support.";} if ($glitch !== false) {$reason = "Banned for abusing in-game glitches and using them to your advantage without informing Admin.";} if ($verbal !== false) {$reason = "Banned for using foul or inappropriate language within the game.";} if ($proxy !== false) {$reason = "Banned for use of proxy's and potential multiple account usage.";} if ($other !== false) {$reason = "Banned at Admin discretion.";} ?>
  3. basically got a list of data that i wanna output, but the same data is in $info[92] (like "test - blah blah blah") thought a wildcard would work, hmmm lol....
  4. sounds like a spam bot. and an email clogged server, which is queuing the mails.
  5. <?php $info[92] ="test"; if ($info[92] =="%test%") { $reason = "Blah."; } ?> it doesnt work, lol. any idea? (when echo'd $reason doesn't show anything.)
  6. erm, that went over my head a bit, its the first time ive seen complex sql like this. lol :/
  7. that error replys Error: Invalid use of group function
  8. <?php $query = "SELECT allianceno FROM alliances WHERE draft=1"; $result = mysql_query($query) or die("Error: ".mysql_error()); $draf = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) {$draf[] = $row[0];} for ($i = 0; $i < count($draf); $i++) { $query = "SELECT COUNT(username) FROM users WHERE alliance='".$draf[$i][0]."'"; $result = mysql_query($query) or die("Error: ".mysql_error()); $usersina = array(); $row = mysql_fetch_array($result, MYSQL_NUM); $usersina = $row[0]; echo "alliance number = $draf[$i] users: $usersina<br>"; } ?> this simply echos out the count of usernames within the selected alliance number. the count comes from the users table. my problem is that i want to grab only the alliance number with the highest amount of users in it so i can use this alliance number elsewhere. any ideas peoplez?
  9. Ahh this works. i just wanted to uncomplicate things for the user. entering " into a form box makes more practical sense for the user.
  10. ok im confused lol :-\
  11. but the video url is differnt from the embedded url - url &hl=en_GB&fs=1& - embedded url
  12. I want people to be able to paste the embedded youtube code into a form on mysite. Obviously this is a secuirty threat do to mysql injections. how would the best way to proceed be? "<object width="480" height="385"><param name="movie" value=" name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src=" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>"
×
×
  • 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.