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>&nbsp;";
} else {
print "$i&nbsp;";
}
}
}
?>

<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 Like 51 Dislike
Previous forums Next forums
Other forums

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the

php is not recognized as an internal or external command
Hello,

I am trying to bake the code in CakePHP through my console.
I have changed my Path

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

problem in pagination when processing with selectbox form
Hi,

I have a search form, with select boxes, if am selecting the value from the form, it work

Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash