Jump to content

writing in php


brown2005

Recommended Posts

?>
                <select onchange="window.open(this.options[this.selectedIndex].value,'_top')" class='text'>
<?
echo"            <option></option>";
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=1"' ?> <?php Rate($page1, "1");?>>1</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=2"' ?> <?php Rate($page1, "2");?>>2</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=3"' ?> <?php Rate($page1, "3");?>>3</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=4"' ?> <?php Rate($page1, "4");?>>4</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=5"' ?> <?php Rate($page1, "5");?>>5</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=6"' ?> <?php Rate($page1, "6");?>>6</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=7"' ?> <?php Rate($page1, "7");?>>7</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=8"' ?> <?php Rate($page1, "8");?>>8</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=9"' ?> <?php Rate($page1, "9");?>>9</option> <?
?> <?php echo'  <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate=10"' ?> <?php Rate($page1, "10");?>>10</option> <?
echo" </select>";

i need to change all the above into php, if someone could point me in the right direction with the select bit and the first option i could do the rest, thanks in advance...

p.s. i have tried but when i go onto page it comes up blank..

thanks in advance
Link to comment
https://forums.phpfreaks.com/topic/35232-writing-in-php/
Share on other sites

What does Rate() do?
This should be close, depending on what Rate() is for.
[code]for($i=1; $i<=10; $i++){
  echo '<option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$id.'&rate='.$i.'">'.$i.'</option>';
  Rate($page1, $i);
}[/code]
Link to comment
https://forums.phpfreaks.com/topic/35232-writing-in-php/#findComment-166367
Share on other sites

hi, i have tried

echo"          <font class='text_red_bold'>Rate:&nbsp;&nbsp;</font>";

echo'          <select class="text_red_bold" onchange="window.open(this.options[this.selectedIndex].value,\_top\)">';
echo'            <option></option>';

for($i=1; $i<=10; $i++)
{

echo' <option value="http://www.randomhomepage.co.uk/homepages/files/rate.php?id='.$website_id.'&rate='.$i.'">'.$i.'</option>'; Rate($page1, $i);

}

echo'          </select>';

and it doesnt do anything
Link to comment
https://forums.phpfreaks.com/topic/35232-writing-in-php/#findComment-166406
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.