PDA

View Full Version : whats wrong with this?


Slynderdale
04-19-2002, 09:38 AM
$controls="<a href=\"$PHP_SELF?action=toplist&topnumber=$topnumber\">Show $topnumber sites</a> - Max: <select name=\"topnumber\" onchange="window.location=('toplist.php?s=$session[sessionhash]&topnumber=' + this.options[this.selectedIndex].value + '&action=toplist')">
$controls.="<option";
if ($topnumber=="10") $controls.= " selected";
$controls.=">10</option>";
$controls.="<option";
if ($topnumber=="25") $controls.= " selected";
$controls.=">25</option>";
$controls.="<option";
if ($topnumber=="50") $controls.= " selected";
$controls.=">50</option>";
$controls.="<option";
if ($topnumber=="75") $controls.= " selected";
$controls.=">75</option>";
$controls.="<option";
if ($topnumber=="100") $controls.= " selected";
$controls.=">100</option>";
$controls.="<option";
if ($topnumber=="all") $controls.= " selected";
$controls.=">all</option></select>";

version
04-19-2002, 11:10 AM
$controls="<a href=\"$PHP_SELF?action=toplist&topnumber=$topnumber\">Show $topnumber sites</a> - Max: <select name=\"topnumber\" onchange=\"window.location=('toplist.php?s=$session[sessionhash]&topnumber=' + this.options[this.selectedIndex].value + '&action=toplist')\">";
$controls.="<option";
if ($topnumber=="10") $controls.= " selected";
$controls.=">10</option>";
$controls.="<option";
if ($topnumber=="25") $controls.= " selected";
$controls.=">25</option>";
$controls.="<option";
if ($topnumber=="50") $controls.= " selected";
$controls.=">50</option>";
$controls.="<option";
if ($topnumber=="75") $controls.= " selected";
$controls.=">75</option>";
$controls.="<option";
if ($topnumber=="100") $controls.= " selected";
$controls.=">100</option>";
$controls.="<option";
if ($topnumber=="all") $controls.= " selected";
$controls.=">all</option></select>";


the first line was missing some slashes and an ending semicolon.

Chris M
04-19-2002, 02:21 PM
Lol...

Easy mistake to make...

Satan

Slynderdale
04-19-2002, 06:32 PM
Originally posted by version

$controls="<a href=\"$PHP_SELF?action=toplist&topnumber=$topnumber\">Show $topnumber sites</a> - Max: <select name=\"topnumber\" onchange=\"window.location=('toplist.php?s=$session[sessionhash]&topnumber=' + this.options[this.selectedIndex].value + '&action=toplist')\">";
$controls.="<option";
if ($topnumber=="10") $controls.= " selected";
$controls.=">10</option>";
$controls.="<option";
if ($topnumber=="25") $controls.= " selected";
$controls.=">25</option>";
$controls.="<option";
if ($topnumber=="50") $controls.= " selected";
$controls.=">50</option>";
$controls.="<option";
if ($topnumber=="75") $controls.= " selected";
$controls.=">75</option>";
$controls.="<option";
if ($topnumber=="100") $controls.= " selected";
$controls.=">100</option>";
$controls.="<option";
if ($topnumber=="all") $controls.= " selected";
$controls.=">all</option></select>";


the first line was missing some slashes and an ending semicolon.

hmm thanks, the coding was right but topnumber doesnt get the selected number

Slynderdale
04-20-2002, 05:30 AM
never mind i got it