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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.