Jump to content

BUX

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by BUX

  1. am i supposed to erase the following string from .htaccess? RewriteBase /sites/Starservicerent/ and no condition is needed then?
  2. I dont get the 404 that was a problem i solved. I did change my links and they all look like : home/foo/bar home/foo/bar/gig home/foo/bar/gig/tak ecc The weird thnig is that every time i use one of these links, the links in the following page stack a home/ inside so they look: home/home/foo/bar home/home/foo/bar/gig home/home/foo/bar/gig/tak and after i click on any of these in the next page they become: home/home/home/foo/bar home/home/home/foo/bar/gig home/home/home/foo/bar/gig/tak dont i have to put a rewritecond to check how many sub cat are in the url? so to check if its home/foo or home/foo/bar or home/foo/bar/gig ? I dont know if its the right solution but even if it is i dont know how to apply it ^^ help!
  3. another problem showed up, once i create the .htaccess file the folder which is contained in (the site folder) it disappears to apache! is not visible anymore and gives 404!
  4. I have tried to created friendly urls by editing the .htaccess file and writing in it: RewriteEngine On RewriteBase /SITES/Starservice/ RewriteRule ^home/([^/]+).html home.php?page=$1 [L] RewriteRule ^home/([^/]+)/([^/]+).html home.php?page=$1&vettura=$2 [L] RewriteRule ^home/([^/]+)/([^/]+)/([^/]+).html home.php?page=$1&vettura=$2&cat=$3 [L] RewriteRule ^home/([^/]+)/([^/]+)/([^/]+)/([^/]+).html home.php?page=$1&vettura=$2&cat=$3&ltb=$4 [L] and have changed my links into home/offerte.html home/offerte/eurocargo.html ecc. The problem is that every time i click on a link the links in the following page (which should be the same) stack another home/ creating links like: home/offerte.html home/home/offerte.html home/home/home/offerte.html as you can see from the rewriterules the page (home) is always the same but depending on where the link is from it has more or less variables passed. How do i have to code the rules to make it work properly? thank in advance
  5. If anyone could post a fixed version of my code i would really apprecite it. Thanks
  6. Thank you for the fast reply, indeed this is a tutorial showing a search engine, but it seemns quite complicated for me to blend it into my page (i have read it b4), i have a found an 'easier' version of a search engine here http://www.spoono.com/php/tutorials/tutorial.php?id=12 but although this includes less code im having trouble inserting it into my page, and mainly having the page display all the items at first and the searched ones after a search is done. Am I supposed to enter an if loop containing the html which displays the fields, corresponding to the $search or sometihng like that? here is my updated code <html> <TITLE>Data List Page</TITLE> <body> <?php $username="XXXXX"; $password="XXXXX"; $database="XXXXX"; $search=@$_GET['word'] ; mysql_connect('192.168.0.1',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM filez ORDER BY name ASC"; $result=mysql_query($query); $resultsearch=mysql_query("SELECT * FROM filez WHERE name LIKE '%$search%' ORDER BY name ASC"); $num=mysql_numrows($result); mysql_close(); ?> <table width="835" border="1" align="center"> <tr> <th width="311"><font face="Arial, Helvetica, sans-serif">Name</font></th> <th width="417"><font face="Arial, Helvetica, sans-serif">File</font></th> <th width="85"><font face="Arial, Helvetica, sans-serif">Download</font></th> </tr> </table> <form action="search.php" method="gett"> <table width="835" border="0" align="center"> <tr bgcolor="#FFFFFF"> <td width="146" ><input type="text" name="word" /></td> <td width="679"><input type="submit" name="submit" value="Search" /></td> </tr> </table> </form> <?php $i=0; while ($i < $num) { $f1=mysql_result($result,$i,"name"); $f2=mysql_result($result,$i,"file"); $f3=mysql_result($resultsearch,$i,"name"); $f4=mysql_result($resultsearch,$i,"file"); ?> <table width="835" border="0" align="center"> <tr bgcolor="#66FFFF"> <td width="311"><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td> <td width="417"><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td> <td width="85"><font face="Arial, Helvetica, sans-serif"><a href="http://www.inducedvision.com/XXXX/<?php echo $f2; ?>" title="DOWNLOAD FILE" target="_self">Link</a></font></td> </tr> </table> <?php $i++; } ?> </body> </html>
  7. I will post here the code of a page which lists items found in one of my dbs. I would like to enter e search feature. I have inserted the form and set a variable for the entered word, also tried following a few tutorials but it got a bit complicated. I would like the page to display all the items at first and the searched items if a search is done. Could anyone help me recode this? Thanks in advance. <html> <TITLE>Data List Page</TITLE> <body> <?php $username="XXXXX"; $password="XXXXX"; $database="XXXXX"; $var = @$_GET['word'] ; $trimmed = trim($var); mysql_connect('192.168.0.1',$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM filez ORDER BY name ASC"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); ?> <table width="835" border="1" align="center"> <tr> <th width="311"><font face="Arial, Helvetica, sans-serif">Name</font></th> <th width="417"><font face="Arial, Helvetica, sans-serif">File</font></th> <th width="85"><font face="Arial, Helvetica, sans-serif">Download</font></th> </tr> </table> <form name="form" action="search.php" method="get"> <table width="835" border="0" align="center"> <tr bgcolor="#FFFFFF"> <td width="146" ><input type="text" name="word" /></td> <td width="679"><input type="submit" name="submit" value="Search" /></td> </tr> </table> </form> <?php $i=0; while ($i < $num) { $f1=mysql_result($result,$i,"name"); $f2=mysql_result($result,$i,"file"); ?> <table width="835" border="0" align="center"> <tr bgcolor="#66FFFF"> <td width="311"><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td> <td width="417"><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td> <td width="85"><font face="Arial, Helvetica, sans-serif"><a href="http://www.inducedvision.com/XXXX/<?php echo $f2; ?>" title="DOWNLOAD FILE" target="_self">Link</a></font></td> </tr> </table> <?php $i++; } ?> </body> </html>
×
×
  • 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.