help with Get_
Posted on
16th Feb 2014 07:03 pm by
admin
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");
?>
No comments posted yet
Your Answer:
Login to answer
107
51
Other forums
Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad
quotes changing
hi all
in my content
opening quotes " changes to “
close qu
Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s
Pagination won't carry results past page 2.
Hi all,
I've worked out my pagination script and its paginating fine until I click next from
Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var
Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic
cyrillic string conversion question
Hello,
First time here...
I would like to know if there is a way to convert a
Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ
modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out
Consuming third party Payment Gateway API from Procedure.
Hi All,
First of all i would like to thank all the people of the oracle forum for providi