Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. * not tested; comments in the code * $term = mysql_real_escape_string($_POST['term']); //get the POST var and clean it with mysq_real_escape_string() to prevent SQL injections $query="SELECT name FROM table1 WHERE term = '$term'"; //need single quotes around strings ($term) $result=mysql_query($query) or die(mysql_error()); //added for error checking $row = mysql_fetch_assoc($result); //extract the data from the DB via associative array echo $row['name']; //use the array ($row) to display desired results mysql_close();
  2. * Not tested * You don't need this stuff in the top PHP part: if($result->num_rows >0){ $row = mysqli_fetch_assoc($result); $m_mentee= $row["mentee"]; $m_username= $row["username_mentee"]; } and you should change this part to something like: while ($row = mysqli_fetch_assoc($result)){ $aa += 1; ?>
  3. Use the shell execution function: shell_exec("killall Winword.exe"); You're going to have to explain the rest of your problem in more detail.
  4. Why don't you watch the demo or try the free version. If you're going to use that script why don't you just use a WYSIWYG? Also, what's your reason for switching over to PHP if (making an assumption) you don't know it?
  5. Haha those are hilarious! Some of them have to be photoshopped...
  6. Yes, you're adding 2 to $i but never assigning it. So $i is always the same... You should echo $i with your current code and then with Zhadus's solution.
  7. Read this sticky...
  8. You may have better luck starting a new thread, with the relevant code. You will get more replies, good luck!
  9. great, mark as SOLVED please.
  10. I really don't agree with this... What about deprecation, new features, etc...
  11. Can I ask the reason you're asking? You can print it out to the console if you're that desperate.
  12. Try and focus on OOP and proper design models. Having a good design is imperative, especially when dealing with large scale projects.
  13. Sasa's right, you have 2 "address" fields, you need to change the second one to "city". Address: City:
  14. It's a Warning not an Error. Have you tried different files and sizes? It may be specific for "php1f7".
  15. Where are you attending class for the flash video player? Why, did you want to watch? I do...
  16. 1) Please use tags. 2) What exactly does the error say? 3) Put this as your very first PHP line: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  17. What are you trying to do?
  18. This should work: echo "Lead: " . $row['LeadID'] . ""; Then on details.php you can retrieve what LeadID was clicked on by: $_GET['leadid']
  19. Have you instantiated the variables? Should be something like: var exercise=encodeURI(document.getElementById('exercise').value); same with: var qty=document.getElementById('qty').value;
  20. 1) Use regex to check if it's a valid name. 2) If the email is a valid name, send a confirmation email with some sort of unique hash for the user to click on and send a request back to your server. There are plenty of tutorials online and threads on this forum about this. Don't reinvent the wheel, come back with specific questions...
  21. I think you're referring to pagination. Here is a great tutorial on the basics!
  22. I'm sure there's an easy Google API call to retrieve this information. But since you don't want to go that path then you would have to probably use cURL and grab the total number of results with regex. There are plenty of examples on this forum and Google, use them as a template.
  23. is_numeric($variable) //numeric if (trim($variable) == "")) //empty
  24. Yes I see. So what would make you think that any of us would have a copy of the scripts? Chance?
  25. Did you see the BB tags? Even though it was bad sarcasm, it was still sarcasm... Why don't you ask them then? Have you done what thorpe suggested, the most logical thing to do...
×
×
  • 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.