Jump to content

taquitosensei

Members
  • Content Count

    639
  • Joined

  • Last visited

Community Reputation

1 Neutral

About taquitosensei

  • Rank
    Prolific Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. taquitosensei

    Undefined offset & error in your SQL syntax

    But the tutorial you're using is extremely outdated and it would be better to familarize yourself with the more recent now before you get into bad habits. If it's using mysqli, then it's probably using php 5, which could be as old as 2004. Probably not quite that old but still.
  2. Have you tried using success(data) { console.log('Type: ' + data.type + ' Message: ' + data.message); } then check console to make sure it's getting to that point.
  3. You're not returning the success in the right format. It needs to be something like this. From the jquery ajax documentation. $response_array=array($data,True,XMLHttpRequestObject); echo json_encode($response_array);
  4. taquitosensei

    Beginner PHP developer looking for suggestions

    Also if you're having an issue. Explaining what your expected end result is, can be more helpful than the error sometimes. Because then we can say you'll never get there from here. Try it this way.
  5. taquitosensei

    rearrange dates in a DB table

    If that is what the OP is after. There's a built in date class in php that will do it for you. From the documentation. $d1=new DateTime("2012-07-08 11:14:15.638276"); $d2=new DateTime("2012-07-08 11:14:15.889342"); $diff=$d2->diff($d1); print_r( $diff ) ; /* returns: DateInterval Object ( [y] => 0 [m] => 0 [d] => 0 [h] => 0 [i] => 0 [s] => 0 [invert] => 0 [days] => 0 ) */
  6. taquitosensei

    Changing sorting order in pagination class

    If you look at their example it's got an "order by id" in the query passed to the pagination object. Put either ASC or DESC after that depending on whether you want ascending or descending. In your case DESC.
  7. taquitosensei

    How to replace ereg function for PHP 7?

    What theme is it. Is there an update to the theme? If that's broken, more likely than not there will be other parts broken as well. If not here's a guide on how to make the switch. https://docstore.mik.ua/orelly/webprog/pcook/ch13_02.htm
  8. taquitosensei

    preg_replace() to preg_replace_callback

    Converting it to what? What do you want it to do? What is it not doing?
  9. taquitosensei

    Wordpress/Php help

    Have you viewed the source to see if there's a selector you can use in CSS so you don't have to mess with the php at all. https://www.w3schools.com/cssref/css_selectors.asp
  10. taquitosensei

    multiple select statements

    Agree with NotionCommotion create a function that you can pass 10 or 30 to then run the appropriate sql.
  11. taquitosensei

    Do you see my coding error?

    echo your query to make sure it's doing what it's supposed to. Psycho is probably right. Those two records problem don't have a first name and you're getting this. "select * from w WHERE first_name=''"; So you get those two rows. echo $query;
  12. taquitosensei

    Valdiation

    I think your $buzz and $buzz2 need to come before and after the <select>'s and then you need to make the blank option selected. <?php echo ($buzz)?$buzz:""; ?> <select name="select"> <option value="" <?php echo ($buzz)?"selected":""; ?>>Please select the level</option> <option value="Administrator">Administrator</option> <option value="License">License</option> <option value="Scorer">Scorer</option> <select> <?php echo ($buzz2)?$buzz2:""; ?>
  13. taquitosensei

    send email from database problem

    NM - just saw the 2nd page of responses. Your original code is really really wrong. It's looping through the database results and trying to send an email each time. Then when you're done with your loop you set the headers and message that you used inside your loop to send the e-mails. Try this. You'll have to put your actual table name in instead of x. But if you don't get anything from that. Then the problem is the query or $link $query = "select * FROM x where id > ='210'"; $result = mysqli_query($link, $query); if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { var_dump($row); } }
  14. taquitosensei

    send email from database problem

    comment out the line that actually sends the e-mail then do a print_r on the $row to make sure you're actually getting the info you're expecting //@mail($email_to, $email_subject, $email_message, $headers); print_r($row);
  15. taquitosensei

    send email from database problem

    You've got alot of things out of order here. You're creating your headers after you send the e-mail. You've got the ending bracket for your database loop before the headers. This may not be perfect. But it should get you closer.
×

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.