Jump to content

lelnguye

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lelnguye's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=378659:date=May 31 2006, 05:46 AM:name=werty37)--][div class=\'quotetop\']QUOTE(werty37 @ May 31 2006, 05:46 AM) [snapback]378659[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi, I havent used it but i know that there is package for php5 to scan viruses - "php5-clamavlib" But i have no idea how use it. The description says [b]PHP ClamAV Lib - ClamAV Interface for PHP5 Scripts[/b] [i]PHP ClamAV Lib is a PHP5 extension that allows to incorporate virus scanning features on your PHP5 scripts. It uses the Clam AV API for virus scanning. This version are supported two functions for file scanning and buffer scanning.[/i] [/quote] hello, thanks for the suggestion, I will look into it
  2. [!--quoteo(post=378652:date=May 31 2006, 05:24 AM:name=Essjay_d12)--][div class=\'quotetop\']QUOTE(Essjay_d12 @ May 31 2006, 05:24 AM) [snapback]378652[/snapback][/div][div class=\'quotemain\'][!--quotec--] Can someone see if they can see where this code is going wrong? I'm trying to explode a variable $genre then each value in the new array needs to be put back into an SQL query - where i attempted to insert a new variable ($finalString) into the sql statement. [code] if (isset($_SESSION['username'])) { $genre = $_GET['genre']; // retrieve passed variable //open connection $conn = mysql_connect("localhost", "admin", "adm1n"); mysql_select_db("project",$conn); $sql = "select USERNAME, PASSWORD, F_NAME, FAVOURITES, ADMIN, DOB from users where USERNAME = '$_SESSION[username]'"; $check = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($check)) { $genre = ($row['FAVOURITES']); $genre2 = explode(', ', $genre); } $count = count($genre2); $i=0; $finalString = NULL; do { if (i > 0) $String = " OR F_TYPE LIKE '%"; $finalString = $String + $genre2[$i]; $String2 = "%'"; $finalString = $finalString + $String2; $i++; else $String = "F_TYPE LIKE '%"; $finalString = $String + $[i]; $String2 = "%'"; $finalString = $finalString + $String2; $i++; //echo "The number is " . $i . "<br />"; } while ($i<$count); $query = "SELECT ID_NO, F_NAME, F_DIRECTOR, F_REVIEWER, F_DATETIME, F_TYPE, F_SUMMARY, F_REVIEW, F_SCORE FROM films WHERE $finalString ORDER BY F_DATETIME LIMIT 1, 20 ";[/code] At the moment its picking out an error at 'else'... Parse error: parse error, unexpected T_ELSE Can someone see why? Thanks d [/quote] It seems like you're not encapsulating the if and else statements in { ... }, them squiggly things
  3. [!--quoteo(post=378644:date=May 31 2006, 04:53 AM:name=izzy)--][div class=\'quotetop\']QUOTE(izzy @ May 31 2006, 04:53 AM) [snapback]378644[/snapback][/div][div class=\'quotemain\'][!--quotec--] I'm making a search section for my site. What i would like is a pulldown menu were visitors can selct a price range for their search in the database. I already have a search that works, but now i would like them to be able to search i a price range. The prices for objects are in my database and the pulldown would look like this for example: make a selection... 0 - 10 10 - 20 20 - 30 30 - 40 40 - 50 50 - more how can i write the script to do this. What would be different than a normal search script? [/quote] I'm not sure if this is what you're looking for, but you could use select form... for example <form method="post" action="someaction.php"> <select name="price_range"> <option> 0-10 </option> ... </select> <input type="submit" name="submit"> and in your php code you could write <? if (isset($_POST['price_range'])) { $range = $_POST['price_range']; etc... } ?> well... hope this helps
  4. Hello, I'm developing a web application where users can upload files into the server. I would like to make it so that the web application performs a virus scan of the file being uploaded before putting it on the server. Not sure if any of that makes sense or if this is the right place to ask this question, but thanks in advance for any reply, cheers
×
×
  • 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.