Jump to content

micah1701

Members
  • Posts

    613
  • Joined

  • Last visited

Everything posted by micah1701

  1. you mean like this? <form action="<?php echo $_SERVER["PHP_SELF"]."?start=1&fn=".urlencode($filename)."&foffset=0&totalqueries=0"; ?>" />
  2. the function needs to "save" the values in the original fields and then, when it re-creates those fields when it updates the content of "uploadFields," it can set the VALUE parameter to that "saved" value. I'd add something like this to your function: <script type="text/javascript"> <!-- function addField() { //get value of current field var current_value = document.getElementByID['uFile'].value; //create current field var txt = "<input name=\"uFile[]\" type=\"file\" id=\"uFile[]\" size=\"50\" value=\""+ current_value +"\" /><br />"; //append with new blank field extra field txt += "<input name=\"uFile[]\" type=\"file\" id=\"uFile[]\" size=\"50\"/><br />"; document.getElementById("uploadFields").innerHTML = txt; } //--> </script> of course, my example wont work after you'ved added 2 or more fields. You'll need to loop through ALL of the existing fields since there can be more then one element named "uFile" hope that helps a little
  3. you could add a loop within your loop. you could add a loop within your loop. <?php $i=1; // star your current loop: while(......){ if($i=1){ echo "<tr>"; } // the rest of your code here if($i=10){ echo "</tr>"; $i=1; } else { $i++; } // end your loop: } ?>
  4. just like those <br /> tags, you can add HTML to your string. you might be getting hung up on the "quotes" though. Because your PHP string is in quotes, you need to \escape\ the html quotes within that string $html .= "Request ID : <a href=\"link2wherever\">$request[reqid]</a><br />";
  5. it may just be an HTML problem of absolute paths. trying adding a leading "slash" before your links. instead of: text/$win/$walkemail.php use: /text/$win/$walkemail.php
  6. I might just be confused at what you're trying to do.. but doesn't header(sprintf("Location: %s", $insertGoTo)); forward the user before you get to the part that creates the URL you want? $insertGoTo includes the value of the var $fromaddress, but you're not setting that value until the end so its blank.
  7. my guess is it has something to do with single vs double quotes. <?php $name = "Andy"; echo "$name"; // prints: Andy echo '$name'; // prints: $name ?>
  8. I'm not sure I understand the problem... is the HTML field a simple text field? If so this should work: <input type="text" value="<?php echo $_GET['to'] ?>"> if the HTML field is something like a <select> drop down box, then you would need to change it up a bit; like: <select name="to"> <option value="President" <?php if($_GET['to'] == "President"){ echo "selected"; } ?> >President</option> </select>
  9. 900 is the number of seconds. <? $test = strtotime("+15 minutes", $time_day_start_count); echo date("H:i",$test); // should return 00:15 ?>
  10. just get rid of "LIMIT 1" and you should be all set.
  11. it doesn't solve you're problem but instead of using commas to deliminate your columns, you could use Tabs. instead of "," use "\t"
  12. i would use explode() instead and make it an array. <?php $string = "12345-ABCDEF"; $parts = explode("-",$string); echo $parts[0]; // 12345 echo $parts[1]; // ABCDEF ?>
  13. you could use strtotime $fiften_minutes = strtotime("+15 minutes", $given_time);
  14. localhost should be replaced with the location of the database, like the IP Address
  15. take out the second "WHERE" in your query statement. "SELECT image_url FROM ads WHERE id = '$rand' AND hits < clicks"
  16. you can only call javascript functions from HTML. php runs server side BEFORE the HTML is output to the user's browser. Once that HTML is rendered in the browser, it is to late for a user's actions to call a php function. You can, however, call a JavaScript function (as JS runs on the client side, like HTML). What is it you want your function to do?
  17. what are the parameters you are sending the times that it returns "0" ?
  18. probably not...but when you do, ask questions in this sites Regex board. There are a few geniuses that keep an eye on those threads who always post awesome advice (I'm not one of them)
  19. preg_replace is geared towards using Perl Regular Expressions. where as str_replace is for simple search and replace functions.
  20. are you getting any specific error message? you might want try: $sql = "UPDATE reff SET notes = '$_POST[mynotes]' WHERE `pid` = '$pid' ";
  21. how is it that you have over 1,000 posts on this site and still managed to post such a poorly worded question?
  22. someone will hopefully answer with something better, and more direct to what you're trying to do.. but I was thinking, you could perhaps make 2 scripts. the first one is your script with the loop that looks up all the files in the directory and loops through them. Then each time through the loop it triggers the second script,perhaps using exec(). This way you'd be forking the process - one for each time through the loop - and you don't have to worry about that second script timing out. then, as the second script finishes doing its business - it can save its findings either to a database table or a common flat file.
  23. are you looking for an application that allows end users to do this on a regular basis or are you just trying to get a spreadsheet into your database? if the later is true, save the spread sheet as a comma or tab delimited CSV or TXT file in excel. Then you can upload it easily with phpMyAdmin or a few SQL commands.
×
×
  • 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.