Jump to content

dzelenika

Members
  • Posts

    229
  • Joined

  • Last visited

Everything posted by dzelenika

  1. why are you waiting 5 seconds? Is your script throwing some error or doing something else?
  2. I'm not sure that I understand you but try to modify your echo to this echo "<td>$sent_time </td>";
  3. while ($travel1 = mysql_fetch_assoc($travel2) || $x < 5) {
  4. Encrypting source doesn't makes sense because user can see encrypted source. There's only possible to change music source dynamically every time user request page ...
  5. $output = "30|24|17,5|4|20,15|13|33,15|22|33,9|20|22"; $string = "(" . str_replace(",", ") (", $output) . ")";
  6. <p>Which of the following best describes your religion:<br> <select name="religious"> <?php $arr = array(0 => "Non religious", 1=> "Christianity", 2=> ...); foreach($arr as $key => $val) { echo '<option ' . ($key == $religious ? 'selected="selected"' : "") . 'value="' . $key . '">' . $val . '</option>' } ?> </select></p>
  7. Have You tried Archive_Zip PEAR PHP class?
  8. what about? $rs=mysql_query("SELECT tblbusiness.*, tblsub.* FROM tblbusiness JOIN tblsub WHERE tblbusiness.category = tblsub.subsec AND tblsub.catid='$view' AND tblsub.subsec = '" . $rs["subsec"] . "'");
  9. You omitted $view = $_GET["view"];
  10. is this code part of a function that returns text?
  11. Is Your server on Windows, linux or some other OS?
  12. Object oriented code is harder (and slower) to write and sometimes is slower executed, but is easier to maintain, reuse and debug. It is also less error prone and easier to extend and scale ... If you don't see reason to write OO code it's better to write good procedural style instead of bad OO.
  13. I think that you should put OR in parenthesis: SELECT f.*, (SELECT id FROM posts l WHERE l.username = f.addee OR l.username = f.adder ORDER BY id DESC LIMIT $select1,1) AS maxValue FROM friends f WHERE (f.adder = '$_SESSION[username]' OR f.addee='$_SESSION[username]') AND ...
  14. Let's suppose that every category1 textbox is called data1[] and category1 textbox is called data2[] data receiving code should look like foreach($_REQUEST["data1"] as $value) { //do some insert } foreach($_REQUEST["data2"] as $value) { // do some insert }
  15. add ini_set("auto_detect_line_endings", 1); as 1st line of your script
  16. fegtcsv doesn't recognize your line endings. Which is your server OS and OS of client that created CSV file?
  17. if you try with: $filename = $_FILES['sel_file']['tmp_name']; $handle = fopen($filename, "r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { print_r($data); mysql_query("INSERT INTO user SET id = '".$userid."', name = '".$data[0]."', email = '".$data[1]."', phone = '".$data[2]."'") or die(mysql_error()); } fclose($handle); what is the output?
  18. is this what you need: <?php $total = mysql_num_rows($result); for ($i = 0; $i < $total; $i+= $total/120) { echo $row['customer_name'] . "<br />\n"; } ?>
  19. http://www.php.net/manual/en/pdo.prepare.php If you don't want to use PDO and you're on windows there's also excellent Microsoft's SQL Server Driver for PHP here available: http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
  20. Use prepared statements, so you don't need to worry about SQL injection.
  21. I think that using MySql security is bad idea you should create user table, file table and user's group_file connection table eg; user table: id name login pass group (admin, editor, proofer, journalist ...) file table: id filename file_group table file group
×
×
  • 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.