ok some how this is not working i am not sure what i am doing wrong here but what this does is when the user goes to Secret-Codes.php they get a menu and when they pick the phone they want to view it then displays it as expl www.bhawap.com/Secret-Codes?phone=Nokia but i some how am doing something wrong here is my code
Code: <?php
$ShowBookmark = "False";
include 'Include/Header.php';
if($_GET['phone'] == True) {
GetCodes();
}else {
Show_Form();
}
function Show_Form() {
$thedate = date('l dS F Y');
echo '<div class="hd2"><font color=#666666><strong><center>Mobile Secret Codes</center></strong></font></div>
';
echo '<center><font face="Verdana" size="2" color="#3366ff"><u>' .$thedate. '</center></u></font>';
echo '<table id="" border="0" style="font-size:9pt;width:100%;">';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=BenQ">BenQ</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Nokia">Nokia</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Lg">Lg</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Sharp">Sharp</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Motorola">Motorola</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Samsung">Samsung</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Sony-erricson">Sony-erricson</b></font></a>
';
echo '</td></tr>';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/tools.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="Secret-Codes.php?phone=Sagem">Sagem</b></font></a>
';
echo '</td></tr>';
echo '</table>';
echo '<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>';
echo '<table id="" border="0" style="font-size:9pt;width:100%;">';
echo '<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>';
echo '<font face="Verdana" size="2"><b><a href="index.php">Back</b></font></a>
';
echo '</td></tr>';
echo '</table>';
echo '<hr>';
include 'Include/Footer.php';
Show_Buttons("True", "index.php?Cmd=100","True");
}
function GetCodes() {
if($_GET['phone'] == "Sagem"){
$getMyDataFrom = phone-codes/sagem.txt
}
if($_GET['phone'] == "Lg"){
$getMyDataFrom = phone-codes/lg.txt
}
if($_GET['phone'] == "Motorola"){
$getMyDataFrom = phone-codes/motorola.txt
}
if($_GET['phone'] == "Nokia"){
$getMyDataFrom = phone-codes/nokia.txt
}
if($_GET['phone'] == "Samsung"){
$getMyDataFrom = phone-codes/samsung.txt
}
if($_GET['phone'] == "Sharp"){
$getMyDataFrom = phone-codes/sharp.txt
}
if($_GET['phone'] == "Sony-erricson"){
$getMyDataFrom = phone-codes/sony-erricson.txt
}
if($_GET['phone'] == "BenQ"){
$getMyDataFrom = phone-codes/benq.txt
}
if(!isset($_GET['page'])){
$page=0;
} else {
$page=$_GET['page'];
}
$numsent=8; //number of sentences per page
$lines = file(' .$getMyDataFrom. ');
$startnum=$page*$numsent;
$endnum=$startnum+$numsent;
$numpartsinstring=count($lines); //counts number of lines in string
for($i=0;$i<$startnum;$i++){
unset($lines [$i]); //kills parts before
}
for($j=$endnum;$j<$numpartsinstring;$j++){
unset($lines [$j]); // kill parts after
}
$newstring=implode($lines,'
');
$i=0;
$upper = 60;
while ($i <= $upper) {
$newstring = str_replace($i, '<font face="Verdana" color="red">' . $i . '</font>', $newstring);
$i++;
}
$newstring = str_replace('#', '<font face="Verdana" color="red">#</font>', $newstring);
$newstring = str_replace('-', '<font face="Verdana" color="red">-</font>', $newstring);
$newstring = str_replace('*', '<font face="Verdana" color="red">*</font>', $newstring);
print ' <div class="hd2"><center><font color=#666666><strong>BenQ Secret codes</strong></font></center></div>
'."n";
print '<font face="Verdana" size="2">' .$newstring. '</font>';
print "
";
$numpages=ceil($numpartsinstring/$numsent);
for($i=1;$i<=$numpages;$i++){
$actualstart=$i-1;
if($actualstart!=$page) {
print "<A href='BenQ.php?page=$actualstart'>$i</a> ";
} else {
print "$i ";
}
}
}
?>
<center><font face="Verdana" size="2"><?php echo $GLOBALS["Advert03"]; ?></font></center>
<table id="" border="0" style="font-size:9pt;width:100%;">
<tr style="font-color:#85859c;"><td style="width:10px;"><img src="Images/Logos/Logo_Back.gif"></td><td>
<font face="Verdana" size="2"><b><a href="secret-codes.php">Back</b></font></a>
</td></tr>
</table>
<hr>
<?php
include 'Include/Footer.php';
Log_Hit("secret-codes");
?>
How a counter of users ? such as ---> (231 Viewing)
I want to count how many users are actually viewing the page, How is that possible?Thank you guys!
Run function every 5 mins ??
I have a function PostMessage()How can I run it every 5 mins ??
DELETE rows based on content
I have a link in my rows$bit="http://bit.ly/abcd";$query = mysql_query("DELETE FROM *table* WHERE sentence........");//I need to delete all sentence rows which DOES NOT contain my
Help with form post data and arrays
Hi all,I am new to this forum... It has been awhile since i have worked with arrays, and i am starting to pull my hair out with this little issue i am having..I hope someone can help me out with it,
PHP4 to PHP5 Conversion
Hi Everyone,I am working on a site that is built up on PHP4 and each page is being started from <? instead of <?php as of PHP5.I want to convert this <? to <?php on every
[PHP HELP] Php order form.
Hello to everyone @ phpfreaks. Im new to this site and hope to learn lots of things here.First of all im here to ask for some help if posible. Im a newbie at php and do not know much about it. my
extending tidy
I have problem with type-hinting and extending tidy. This code creates error:Code: class cMyTidy extends tidy{ public $tralala;}$oMyTidy = new cMyTidy();doSomething($oMyTidy);function
issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to come up false... ( yes the username and password is correct)
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
SuperCali PHP Event Calendar
does anyone have any experience with the SuperCali PHP Event Calendar? I could use some assistance in writing a custom function for it, anyone ever messed with it before?