Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You 'll need to look into ldap. I haven't got any code on me at the moment because I'm at home but I have a pretty simple example at work. Basically, you use the username that you have to search through ldap and find what groups the user belongs too.
  2. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=321924.0
  3. Because you don't define $row3 until here.... while($row3 = mysqli_fetch_array($data3)) { this is within your if, so never actually gets executed. You need to move your if statements into the while loop.
  4. A simple example.... function smileys() { echo "In here you would have your sileys code"; } if (isset($_GET['action'] && $_GET['action'] == 'smileys') { smileys(); } echo '<a href="?action=smileys">Execute Smileys</a>';
  5. var_dump doesn't return any value. The problem your having is that $row3 isn't defined yet where you are trying to use it. Your basically doing.... if ($row3) { // code that defines $row3 } It makes no sense.
  6. This is how we send me where I work. Your images will need to be hosted online somewhere obviously. You can also use images to keep track of how many people are opening the emails.
  7. Code 2 would work except you passing the variable $header to the mail functions instead of $headers. You'll also want a while {} no a do {} while, because your first loop won't have $row_email['email'] defined otherwise.
  8. Why not show us some of your problematic code and we'll go from there?
  9. The $_SESSION array will be set. You need to check further into the array. eg; if (!isset($_SESSION['username'])) { header('Location: messageboard.php'); }
  10. You need to pass a file path to require_once, not a url. eg; require_once "quick_form/QuickForm2.php";
  11. it means exactly what it says. Your query failed, because there is no column called 'late'. This is some of the worst code of seen for a while. This in particular.... $stat = @mysql_fetch_assoc(mysql_query($query)); How do you expect to handle errors here?
  12. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=321915.0
  13. That is Ajax in a nutshell yes.
  14. Ajax is used to make another request back to the server? Why would you need to request a js file? Just include the file as normal.
  15. trq

    Where Syntax..

    Something like.... $page = mysql_real_escape_string($_SERVER['REQUEST_URI']); $Query="SELECT user.*, comment.* FROM user, comment WHERE user.userid = comment.userid && comment.page = '$page'";
  16. The code you have posted is of no help at all.
  17. I could have swarn you said the column_id wasn't unique. Sorry. Anyway, I don't really see the point in this function. If it produces ..... $rows['user1'] = array('user_id' => 1, 'user_name' => 'user1'); $rows['user2'] = array('user_id' => 1, 'user_name' => 'user2'); $rows['user3'] = array('user_id' => 1, 'user_name' => 'user2'); Then it is duplicating data. Why do you need the user names twice? You much better off simply returning a numerically indexed array.... $rows = array(); while($row = mysql_fetch_assoc($query)) { $rows[] = $row; } And then again even more better off looping through the results in your calling code. This way you only need the one loop and not two.
  18. yes, sorry lol All those websites have api's, they won't let you create accounts ( you need an existing account to use them ), but they can perform various other duties. I'm sure if you read the TOS on those sites that multiple accounts are a no go anyway.
  19. How do you figure? You keep overriding the same index.
  20. The function you have posted does nothing. if you want help with code, it's always best to show us your actual code.
  21. Pretty vague with your description there. Where exactly are you stuck?
  22. Neither of the functions posted will work, they both contain undefined variables. Nor does the idea make much sense. What if you want more than 1 record? You'll only ever get the last record.
  23. Your function makes no sense. can we see how you call this function to get any result?
  24. Funny that. You might have been better off doing the test before asking.
×
×
  • 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.