Jump to content

taquitosensei

Members
  • Content Count

    662
  • Joined

  • Last visited

  • Days Won

    1

taquitosensei last won the day on May 24

taquitosensei had the most liked content!

Community Reputation

3 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. A white screen could be a fatal error. I would turn on error reporting put ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); at the top of your index.php, if it is a fatal error, the error should display instead of the white screen.
  2. taquitosensei

    Problem with Form URL in PHP Code

    When you use the $row variable in your form action you're not in the $row loop yet and that wouldn't make sense anyways because you'd be creating your form repeatedly, as many times as there are results in your query. Also selecting an option with the value of the URL you want to be redirected to won't work. The value would just get passed with the other form data. For this to work you would need javascript to get the url from the selected option and redirect you.
  3. Yeah ok nm I wasn't thinking when I wrote that.
  4. Just curious would this be any more efficient? SELECT entry_id, votes FROM entries group by entry_id order by votes ASC
  5. taquitosensei

    ajax redirect doesn't work after php insert mysql query

    Along with everything else. You need to echo a properly formatted json string. echo "{'message':'correct'}"; then if(data.message === 'correct')
  6. taquitosensei

    Live location tracking using php and javascript

    So you want tracking information but want it refreshed on a regular basis? Is it always shipped through the same shipping company? ie FedEx, UPS, etc? If not you'll have to come up with a solution for each tracking company. Just deal with pulling tracking information first, then worry about refreshing it. So you have to pull the shipping provider and tracking # out of your database, then based on the shipping provider use an api to get the tracking info, then parse that info and display it.
  7. taquitosensei

    Site Won't Submit Multiple Variables

    Try this. <form id="main-search-form" method="POST" action="<?= $baseurl; ?>/_searchresults.php" role="search"> <select id="query-input" name="city_id" style="width:28.8%" style="height:69px" required> <option value="">Select Area</option> <option value="3,1">Ches & VB</option> <option value="3">Chesapeake , VA</option> <option value="9">Hampton , VA</option> <option value="10">Newport News , VA</option> <option value="2">Norfolk , VA</option> <option value="12">Poquoson , VA</option> <option value="4">Portsmouth , VA</option> <option value="5">Suffolk , VA</option> <option value="1">Virginia Beach , VA</option> <option value="11">Williamsburg , VA</option> <option value="0">All Active US Cities</option> </select> then if($_SERVER['REQUEST_METHOD'] == 'POST'){ if(isset($_POST['city_id']) && $_POST['city_id']!="") { $city_ids=explode(",", $_POST['city_id']); $query = "SELECT city_name, state FROM cities"; switch($_POST['city_id']) { case 0: Default: $query.=" WHERE city_id IN (:" . implode(',:',$city_ids) . ")"; } $stmt = $conn->prepare($query); foreach($city_ids as $city_id) { $stmt->bindValue(":query_city_id",$city_id); } $stmt->execute(); $cities = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach($cities as $city) { } } } Haven't tested it. But something like this.
  8. If your domain's reverse lookup isn't setup correctly that could cause this. If the spf records aren't configured correctly. If the return address isn't a valid e-mail, ie you haven't created it yet on your mail server. It could be any of those and more. E-Mail is very finicky.
  9. taquitosensei

    Sessions Without Cookies in PHP 7

    I had a boss who had an 80/20 rule. Program for the 80%. He would have told me not to worry about people with their cookies disabled. Make sure it works for everyone else.
  10. taquitosensei

    Important "if" statement relying on mySQL

    I would personally go for #2 I don't know if it's safer. I just like the idea of setting a flag then using that flag.
  11. taquitosensei

    Is this valid syntax?

    I just tried the syntax and it works. Have you tried it? Without knowing where $ARR and $NEEDLE come from and what they look like. It's hard to know what the problem is.
  12. taquitosensei

    import csv in mysql db using ajax and php

    $counter = 0; while ($row = fgetcsv($fp)) { if ($counter > 9) { $stmt->execute(array_slice($row,3)); } $c++; }
  13. taquitosensei

    import csv in mysql db using ajax and php

    I just didn't read it close enough and copied and pasted and adjusted.
  14. taquitosensei

    import csv in mysql db using ajax and php

    You could use a counter and look for the 10th row $counter = 0; while ($row = fgetcsv($fp)) { if ($counter > 9) continue; $stmt->execute(array_slice($row,3)); $c++; }
  15. taquitosensei

    Unexpected end of JSON input

    Because it doesn't work that way. Ajax is client side javascript that runs in the browser. It is not aware of the php page at all until you say, send this data to jobsDatabase.php on the server and get me the results.
×

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.