Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. AyKay47

    Table

    what I like to do when I am having trouble with tables is to set the <td>'s to a background color so I can see how they are acting, the act accordingly....your <hr> width's will definitely push everything else to the right
  2. what do you mean you don't know how to start? did you look at the link i provided?
  3. use a join
  4. that would work but I do not see the reason for a callback function..
  5. dang i missed that too.....wth
  6. this is most likely being caused because you have not checked if your $_GET variable is set.. $pilotid = $_GET['pid']; if(isset($pilotid)){ $sql = "SELECT * FROM pireps WHERE pilotID = '$pilotid' ORDER BY id DESC"; $sql2 = "SELECT pilotID, fname, lname, rank, vatsimID, hours FROM users WHERE pilotID = '$pilotid'"; $result = mysql_query($sql) or die ("An error has occured. Please contact thew webmaster with the following error: " . mysql_error()); $result2 = mysql_query($sql2) or die ("An error has occured. Please contact thew webmaster with the following error: " . mysql_error()); $num = mysql_num_rows($sql); }
  7. hard to say without seeing your logic for the library...it really depends how you have your code setup..callback functions can be very useful if you would like to pass an argument from another function to the calling function
  8. post your code please
  9. in reality, all user-defined functions are callback functions..some defined functions allow for a function passed as an argument, and sometimes callback functions can be useful inside other functions... here are some references.. http://www.sitepoint.com/forums/php-application-design-147/example-callback-php-336758.html http://www.php.net/callback
  10. I have figured this one out, I had a variable from a previous method named $birthday as well that was overwriting my variable...thanks alot for your help
  11. even if I force the value of $birthday to a string like "08/04/1988" mysql is still inserting "--"..
  12. Hey guys, i have a weird issue that I have been trying to debug for almost an hour, can't wrap my brain around it.. I am using the Jquery UI datepicker with an input for a birthday, however even when I take this function out I am having issues which leads me to believe that it is something that mysql is doing.. When I try to insert the date into my table i receive the value of "--" instead of the date..my field to is set to VARCHAR which is why I am not understanding why it would be doing this....heres the relevant code.. in snippets if(preg_match($pattern,$_POST['b_date'],$match)){ $birthday = $match[0]; //set birthday variable from preg_match, this works fine }... $sqlcmd = "INSERT INTO members (first_name, last_name, email, password, b_date, gender, ip, date , randnum, activated) VALUES('$firstname','$lastname','$email','$dbpassword','$birthday','$gender','$ipaddress', '$date', '$randnum', 0)"; $query = mysql_query($sqlcmd) or die (mysql_error()); //inserts the data fine, except for the "--" comes from this input <input type="text" name="b_date" id="birthday" class="input_search_text2" />
  13. have you searched for this at all? there are hundreds of resources on the web for this
  14. yes we cannot help unless we see your custom function print_array() unless you mean print_r?
  15. where is $password coming from, you dont initialize it in your code prior to comparing it to $password123
  16. not really, new and confirm passwords? why would they match
  17. my lungs are dying as we speak...
  18. just variables passed through the url...
  19. lol, it's just example text.. foo and bar are just the names that they choose to use for there variables, arguments etc..
  20. you havn't queried you sql using mysql_query
  21. can you post the code where you are grabbing this value... what is the output for this?
  22. how are you grabbing the value on the other page?
  23. yeah i didn't even look at his example... this is from php.net <?php /* This example assumes that www.example.com is configured to parse .php * files and not .txt files. Also, 'Works' here means that the variables * $foo and $bar are available within the included file. */ // Won't work; file.txt wasn't handled by www.example.com as PHP include 'http://www.example.com/file.txt?foo=1&bar=2'; // Won't work; looks for a file named 'file.php?foo=1&bar=2' on the // local filesystem. include 'file.php?foo=1&bar=2'; // Works. include 'http://www.example.com/file.php?foo=1&bar=2'; $foo = 1; $bar = 2; include 'file.txt'; // Works. include 'file.php'; // Works. ?>
  24. sure as long as the path to the file is correct
×
×
  • 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.