-
Help coverting to PHP
Ok so I am trying to make a
$mainpage="TEXT BELOW";
HTML Code:
<div align="center">
<center><a href="http://kywordpro.com/index.php"><img src="http://kywordpro.com/img/logo.gif" border="0" alt="" style="margin-bottom: 20px;" /></a><br />
<form action="http://kywordpro.com/redirect.php" method="get" class="style1">
<p style="margin-top: 10px;">
Web: <input type="radio"<?php echo ($_GET['a'] == 'txt' || !isset($_GET['a'])) ? " checked=\"checked\"" : ""; ?> name="a" value="txt" /> |
Images: <input type="radio"<?php echo ($_GET['a'] == 'img') ? " checked=\"checked\"" : ""; ?> name="a" value="img" /> |
Video: <input type="radio"<?php echo ($_GET['a'] == 'avi') ? " checked=\"checked\"" : ""; ?> name="a" value="avi" /> |
News: <input type="radio"<?php echo ($_GET['a'] == 'news') ? " checked=\"checked\"" : ""; ?> name="a" value="news" /> |
Music: <input type="radio"<?php echo ($_GET['a'] == 'mp3') ? " checked=\"checked\"" : ""; ?> name="a" value="mp3" /><br />
</p>
<input type="text" name="q" size="55" value="<?php echo ucwords($q .''); ?>" /><br />
<input type="submit" value="KyWordPRO Search" /><br /><br /><br />
But need help converting it since it has several PHP portions.
Can anyone help?
Tim..
-
PHP Code:
$mainpage='<div align="center">
<center><a href="http://kywordpro.com/index.php"><img src="http://kywordpro.com/img/logo.gif" border="0" alt="" style="margin-bottom: 20px;" /></a><br />
<form action="http://kywordpro.com/redirect.php" method="get" class="style1">
<p style="margin-top: 10px;">
Web: <input type="radio"'.($_GET['a'] == 'txt' || !isset($_GET['a'])) ? " checked=\"checked\"" : "" .' name="a" value="txt" /> |
Images: <input type="radio"'. ($_GET['a'] == 'img') ? " checked=\"checked\"" : "" .' name="a" value="img" /> |
Video: <input type="radio"'. ($_GET['a'] == 'avi') ? " checked=\"checked\"" : "" .' name="a" value="avi" /> |
News: <input type="radio"'. ($_GET['a'] == 'news') ? " checked=\"checked\"" : "" .' name="a" value="news" /> |
Music: <input type="radio"'. ($_GET['a'] == 'mp3') ? " checked=\"checked\"" : "" .' name="a" value="mp3" /><br />
</p>
<input type="text" name="q" size="55" value="'. ucwords($q .'') .'" /><br />
<input type="submit" value="KyWordPRO Search" /><br /><br /><br />
<input type=\'hidden\' name="num" value="10"></form></div>';
-
I applied the code and
Parse error: syntax error, unexpected '.' in /home/content/t/g/a/tgallagher26/html/index.php on line 35
Tim..
-
-
Parse error: syntax error, unexpected T_ECHO in /home/content/t/g/a/tgallagher26/html/index.php on line 41
-
didn't notice that. fixed
-
Parse error: syntax error, unexpected ';' in /home/content/t/g/a/tgallagher26/html/index.php on line 41
Plus I left the last line out.
<input type='hidden' name="num" value="10"></form></div>
-
ops, took out the wrong character. fixed now
-
it dint work
Look at http://kywordpro.com/index.php
Tell me when you look at it
-
ok try:
Code:
$txt=($_GET['a'] == 'txt' || !isset($_GET['a'])) ? " checked=\"checked\"" : "";
$img=($_GET['a'] == 'img') ? " checked=\"checked\"" : "";
$avi=($_GET['a'] == 'avi') ? " checked=\"checked\"" : "";
$news=($_GET['a'] == 'news') ? " checked=\"checked\"" : "";
$mp3=($_GET['a'] == 'mp3') ? " checked=\"checked\"" : "";
$mainpage='<div align="center">
<center><a href="http://kywordpro.com/index.php"><img src="http://kywordpro.com/img/logo.gif" border="0" alt="" style="margin-bottom: 20px;" /></a><br />
<form action="http://kywordpro.com/redirect.php" method="get" class="style1">
<p style="margin-top: 10px;">
Web: <input type="radio"'. $txt .' name="a" value="txt" /> |
Images: <input type="radio"'. $img .' name="a" value="img" /> |
Video: <input type="radio"'. $avi .' name="a" value="avi" /> |
News: <input type="radio"'. $news .' name="a" value="news" /> |
Music: <input type="radio"'. $mp3 .' name="a" value="mp3" /><br />
</p>
<input type="text" name="q" size="55" value="'. ucwords($q .'') .'" /><br />
<input type="submit" value="KyWordPRO Search" /><br /><br /><br />
<input type=\'hidden\' name="num" value="10"></form></div>';
-
Thanks for you help.
If you would please look at
http://www.dynamicdrive.com/forums/s...ad.php?t=42706
to see if you can help with this one too.
-