# error GeN4 t.php on line 124

**URL:** <https://www.phphelp.com/t/error-gen4-t-php-on-line-124/13982>\
**Category:** MySQL database\
**Created:** [July 29, 2011, 1:36pm UTC](https://www.phphelp.com/t/error-gen4-t-php-on-line-124/13982 "2011-07-29T13:36:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radiokiko](https://www.phphelp.com/user_avatar/www.phphelp.com/radiokiko/32/385_2.png) [@radiokiko](https://www.phphelp.com/u/radiokiko)\
**Post date:** [July 29, 2011, 1:36pm UTC](https://www.phphelp.com/t/error-gen4-t-php-on-line-124/13982/1 "2011-07-29T13:36:41Z")

</div>

Excuse my English.  
I have a problem with the site, the error please help me. thank you this site. 5 stars helped a lot of time. I wait for thanks :’(

Warning: mysql\_fetch\_array(): supplied argument is not a valid MySQL result resource in /home/escolinh/public\_html/portugal/themes/GeN4/t.php on line 124

page

\<?php /\* http://wwwportugal.phonemoney.co.cc/ \*/ if(!defined("START\_PROCESS")) { die(""); } //This prevents SQL Code injection / XSS Attacks. function replace\_meta\_chars($string){ return @eregi\_replace("([\*])|([|])|([;]|([`])","",$string); } if($loggedin) { $email = $ir['email']; } else { $HTTP_REMOTEIP=$_SERVER['HTTP_REMOTEIP']; $email = $HTTP_REMOTEIP; } $HTTP_REFERRER=$_SERVER['HTTP_REFERER']; $REMOTE_ADDR=$_SERVER['REMOTE_ADDR']; if ($HTTP_REFERRER !='' && $REMOTE_ADDR !=''){ while(list($keyx,$valuex) = each($_REQUEST)) { if(strpos($valuex,"[*]") OR strpos($valuex,"[|]") OR strpos($valuex,"[;]")){ mail($set['contact_email'],"Hack Alert","There's been a SQL Injection hacking attempt at ".$location." WHERE REFERRER was ". $HTTP_REFERRER. " AND REMOTE_ADDR was " .$REMOTE_ADDR."","FROM:".$email); } } } reset ($_REQUEST); while(list($keyx,$valuex) = each($_REQUEST)){ ${$keyx} = replace_meta_chars($valuex); print(${$keyx}); } //end anti SQL XSS script. $title = $set['title']." - ".$ref_title; $kw = $set['keywords']; $desc = $set['desc']; //desc $location = $do-\>get_loc(); $currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode('/', $currentFile); $currentFile = $parts[count($parts) - 1]; $theme = $location."themes/GeN4/"; ?\> \<?php print $title ?\> \<?php // Last action update if($loggedin) { $sql = "UPDATE `users` SET `lastaction` = ".time()." WHERE `username` = '{$ir['username']}'"; mysql\_query($sql); } $a = $b = $c = $d = $e = $g = $h = $i = $j = $k = $l = null; switch($currentFile) { case "index.php": $a = " class=\"active\""; break; case "ads.php": $b = " class=\"active\""; break; case "faq.php": $c = " class=\"active\""; break; case "adver.php": $d = " class=\"active\""; break; case "contact.php": $e = " class=\"active\""; break; case "register.php": $f = " class=\"active\""; break; case "login.php": $g = " class=\"active\""; break; default: $h = " class=\"active\""; break; } ?\>

 \<?php if($set['color\_changer']) { ?\> 
AquaBlackDark BlueDark GreenDark PinkLeafy GreenLight BlueMustardPinkPurpleRedRustSober Blue
 \<?php } ?\> 

```
<div id="navigation">
	<ul>
		<li><a href="index.php"<?php echo $a; ?>>Home</a></li>
		<li class="surf"><a href="ads.php"<?php echo $b; ?>>Surf Ads</a></li>
		<li class="faq"><a href="faq.php"<?php echo $c; ?>>FAQS</a></li>
		<li class="advertise"><a href="adver.php"<?php echo $d; ?>>Advertise</a></li>
		<li class="contact"><a href="contact.php"<?php echo $e; ?>>Contact</a></li>

```

\<?php if($set['showforum']) { ?\>

```
		<li class="forumn"><a href="forum/">Forum</a></li>

```

\<?php } if(!$loggedin) { ?\>

```
		<li class="register"><a href="register.php"<?php echo $f; ?>>Register</a></li>
		<li><a href="login.php"<?php echo $g; ?>>Login</a></li>

```

\<?php }else { ?\>

```
		<li class="surf"><a href="acc.php"<?php echo $h; ?>>Account</a></li>
		<li class="logout"><a href="logout.php?s=<?php echo session_id(); ?>">Logout</a></li>

```

\<?php } ?\>

```
	</ul>
</div>
<div class="clear"></div>
```
