Jump to content

NextGenForum.net

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Posts posted by NextGenForum.net

  1. Hi,

     

    Im not sure if what im asking is PHP, but i wanted to know if anyone could help me get a navigation similar to the one here - www.thegamehub.co.uk. When it hovers some more links appear, i am looking for something like that.

     

    Thanks for any help!

     

     

  2. sorry

     

    <form action="<?php echo $editFormAction; ?>" name="form1" method="POST">
    	    <p>
    	      <strong>Company Name:</strong>		      
    	      <input name="name" type="text" id="name">
    </p>
    	    <p><strong>Logo:</strong> 
    	      <input name="logo" type="text" id="logo">	
    	    </p>
    	    <p><strong>Phone:</strong> 
    	      <input name="phone" type="text" id="phone">
    	    </p>
    	    <p><strong>Email: 
    	      </strong>
    	      <input name="email" type="text" id="email">
    </p>
    	    <p><strong>Description -</strong> Short one for category page: 
    	      <textarea name="description" id="description"></textarea>
    </p>
    	    <p><strong>Long Description - </strong>Description for company page: 
    	      <textarea name="longdescription" id="longdescription"></textarea>
    </p>
    	    <p><strong>E-Case - </strong>Short one for category page: 
    	      <textarea name="ecase" id="ecase"></textarea>
    	    </p>
    	    <p><strong>Long E-Case</strong> - E-Case for company page: 
    	      <textarea name="longecase" id="longecase"></textarea>
                  <input type="hidden" name="MM_insert" value="form1">
    	    </p>
    	    <p>
    	      <input type="submit" name="Submit" value="Submit">  
                  </p>
    	  </form>

  3. 		if($total_results >0){
    	$rs = mysql_query($sql);
    	$j =1;
    	while($line = mysql_fetch_assoc($rs)){
    			include('results_stub.tpl');
    			$j++;
    	}
    
    	}
    	else{
    			 echo "Try searching again";
    
    	}
    	if($last != 1){
    					 echo "Pages: ";
    					 for($i=1;$i<($last+1);$i++){
    					 		echo '<a href="?search_text='.$search_txt.'&pagenum='.$i.'">'.$i.'</a> | ';										 
    					 }
    	}
    
    
    }

     

    Can you see any errors here??

     

    www.selectgreen.co.uk When you click go leaving the box empty you get this; Try searching againPages:

     

    Im guessiong its a code error thats causing this. Any help appreciated thanks

  4. <code>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/nextgen/public_html/search.php on line 236

     

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/nextgen/public_html/search.php on line 248

    Sorry, but we can not find an entry to match your query</code>

     

    These are the erroes thats i get after searching i hope thats what you need

     

    Thanks

     

    Also what do you put to get code boxes on the forums

  5. The code below is a search form, that i have found on the web, the bolded lines are producing errors,

     

    www.selectgreen.co.uk/search.php Search for company.

     

    Any help, im hoping its ok apart from those problems

     

    Thanks

    <?
    //This is only displayed if they have submitted the form
    if ($searching =="yes")
    {
    echo "<h2>Results</h2><p>";
    
    //If they did not enter a search term we give them an error
    if ($find == "")
    {
    echo "<p>You forgot to enter a search term";
    exit;
    }
    
    // Otherwise we connect to our Database
    mysql_connect("localhost", "user", "password") or die(mysql_error());
    mysql_select_db("databse") or die(mysql_error());
    
    // We preform a bit of filtering
    $find = strtoupper($find);
    $find = strip_tags($find);
    $find = trim ($find);
    
    //Now we search for our search term, in the field the user specified
    $data = mysql_query("SELECT * FROM property WHERE upper($field) LIKE'%$find%'");
    
    //And we display the results
    <b>while($result = mysql_fetch_array( $data ))</b>
    {
    echo $result['fname'];
    echo " ";
    echo $result['lname'];
    echo "<br>";
    echo $result['info'];
    echo "<br>";
    echo "<br>";
    }
    
    //This counts the number or results - and if there wasn't any it gives them a little message explaining that
    <b>$anymatches=mysql_num_rows($data);</b>
    if ($anymatches == 0)
    {
    echo "Sorry, but we can not find an entry to match your query<br><br>";
    }
    
    //And we remind them what they searched for
    echo "<b>Searched For:</b> " .$find;
    }
    ?>

  6. I wanted to know where to go about making a site search page with a search form, I want it to display the results for the NAME field

    in the database, for example if someone searches for selectgreen then selectgreen.co.uk will come up on a page similar to this. http://selectgreen.co.uk/travel.php. i want the logo of the company and description and ecase to also come up on the results.

     

    I dont know where to start so help would be much appreciated

     

    Thanks

  7. <?php require_once('Connections/sgreen.php'); ?>
    <?php
    $maxRows_property = 10;
    $pageNum_property = 0;
    if (isset($_GET['pageNum_property'])) {
      $pageNum_property = $_GET['pageNum_property'];
    }
    $startRow_property = $pageNum_property * $maxRows_property;
    
    mysql_select_db($database_sgreen, $sgreen);
    $query_property = "SELECT * FROM property ORDER BY id DESC";
    $query_limit_property = sprintf("%s LIMIT %d, %d", $query_property, $startRow_property, $maxRows_property);
    $property = mysql_query($query_limit_property, $sgreen) or die(mysql_error());
    $row_property = mysql_fetch_assoc($property);
    
    if (isset($_GET['totalRows_property'])) {
      $totalRows_property = $_GET['totalRows_property'];
    } else {
      $all_property = mysql_query($query_property);
      $totalRows_property = mysql_num_rows($all_property);
    }
    $totalPages_property = ceil($totalRows_property/$maxRows_property)-1;
    ?>

     

    thats the noly bit i can think u woudl need

     

    all the rest is tables images etc, nohing to do with dbs

  8. SelectGreen.co.uk has 11 different categories, in each there is a selection of companies, i want to link the 'Company Name' to another page called viewproperty.php. This is the page that will dispplay all companies using php db tags.

     

    I cant remember the link its something like viewproperty.php=ID?

     

    i have done it b4 but just cant remember

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