Jump to content


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


Drop down menu Connected to MYSQL...

Recommended Posts

I keep getting the error of Fatal error: Function name must be a string in /home/.caicos/arshem/longlive-ps.com/search.php on line 60

[code] <SCRIPT LANGUAGE="JavaScript">
<!-- This Drop Down Menu was made at www.CodeSpy.com -->

function jumpBox(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;

  </head><body> <div id="main">
  <!-- Copy and Paste this code into the BODY of your HTML document -->

<FORM NAME="categories">
<SELECT NAME="categories" size=1 onChange="javascript:jumpBox()">
<OPTION VALUE="">Go to....
<OPTION VALUE="./search?category=movie">Movies
<OPTION VALUE="./search?category=Audio">Audio
<OPTION VALUE="./search?category=WhitePapers">White Papers
<OPTION VALUE="./search?category=hacking">Hacking
<OPTION VALUE="./search?category=Windows">Windows
<OPTION VALUE="./search?category=AllinOnes">All in Ones
<OPTION VALUE="./search?category=Applications">Applications
<input type=button value="Go!" onClick="javascript:jumpBox(this)">
$category = $_GET('category');  //Line 60
if($category != "") {
$query  = "SELECT id, name, size, uploader FROM upload WHERE category = '$category'";
$result = mysql_query($query) or die('Error, query failed');
if (mysql_num_rows($result) == 0) {
echo "No Files to Delete...Be the first Uploader! <br>";
} else {
$html = "";
while (list($fileid, $filename, $size, $uploader) = mysql_fetch_array($result)) {
          $html .= "<a href=\"admin.php?id=$fileid\">-$filename-</a><br>";

Share this post

Link to post
Share on other sites
Where you have

[code]$category = $_GET('category');[/code]


[code]$category = $_GET['category'];[/code]

Hope this helps!  ;)

Share this post

Link to post
Share on other sites
yes that helped now i have another error(sorry i can't tel the difference between [ and ( my computer is hooked to the TV...small fonts do not like me ;) Notice: Undefined index: category in /home/.caicos/arshem/longlive-ps.com/search.php on line 60

Share this post

Link to post
Share on other sites
This isnt an error, its just a notice, its telling you that this just means that $category = $_GET['category']; doesn't exist. You can check it by using this.


Usually your server is set to hide these notices but obviously in your case its not. so just put this into your script directly under <?php and it will hide your notices.

[code]error_reporting(E_ALL ^ E_NOTICE) ;[/code]

Hope this helps.  ;)

Share this post

Link to post
Share on other sites


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.