Jump to content

maxxd

Gurus
  • Content Count

    1,247
  • Joined

  • Last visited

  • Days Won

    31

maxxd last won the day on March 21

maxxd had the most liked content!

Community Reputation

104 Excellent

About maxxd

  • Rank
    Prolific Member

Contact Methods

  • Website URL
    https://maxxwv.com

Profile Information

  • Gender
    Not Telling
  • Location
    North Carolina

Recent Profile Visitors

15,629 profile views
  1. I'm not entirely sure what you're trying to accomplish with everything after the mysqli_query (also, you may want to look into PDO as it's much easier), but what does this give you: die("<pre>".var_export($result, true)."</pre>"); if you put it right after the mysqli_query line?
  2. PHP is a server-side language, so it only knows the timezone the server is in. As requinix says, you have to tell it what timezone to use. There are a couple different ways to do it - either ask the user or use a JavaScript library and pass the data to the PHP.
  3. You'll need to look into AJAX. Basically, using JavaScript you trigger a call (ajax or fetch) to a php script on your server - in the call you pass the selected value. The php script will use this passed value to determine what to show in the next drop-down and return that to the JavaScript which will then display that data to the user as a second drop-down.
  4. You get the data to the server by submitting the form. You can do it traditionally or via AJAX, but either way the data has to be submitted to get to the PHP. I don't know cake, but if you normally get the request data via $this->request->getData() but it's empty in this case then something's wrong elsewhere.
  5. There's probably a Cake-specific method of creating form fields with an array-enabled name, but I don't have the slightest notion what it would be. To answer your other question, you'll need to submit the form data. Whether you do it via AJAX or a traditional HTML submit doesn't matter - send the data to the PHP script and process it there. I'm not going to lie, given what you've described I'm hard-pressed to believe that what you're doing is actually what you want to do, but then again I don't know your project.
  6. You haven't set a value for the drag12 element, so there's nothing for the JS to get.
  7. The data you're sending from AJAX doesn't include a 'submit' index, which loginizer.php requires to do anything.
  8. You can set the domain (and path, even) for cookies.
  9. So CPANEL is a dependency package that you've not included in your script. I don't use cPanel so I'm not sure how it's set up, but there should be a require or include directive in the script somewhere - either it'll include the script directly, or it'll include an autoloader file in which case you'll see a use statement naming the CPANEL class.
  10. Sorry, but this is completely incorrect. Single quotes in PHP will not interpolate variables, while double quotes will. So this: echo '$var'; will output $var , and echo "$var"; will output value
  11. I didn't read all your code, but on a macro-level you have a couple choices. Either get all the information on page load and use PHP to put it into JS variables or HTML data attributes, or use AJAX on the mouse over event and do it dynamically (slower, but IMO a better choice).
  12. It looks like you're trying to combine cURL CLI and cURL php. They aren't interchangeable or compatible. Follow the link gw1500se gave you, then consider NotionCommon's advice.
  13. maxxd

    PHP Objects

    What you've done is create an array of strings. The Book objects that represent 'Moby Dick' and 'Wuthering Heights' are $first_book and $second_book. So this is what you're looking for: $book = array($first_book, $second_book);
  14. In your select query, limit the result by the user ID. I assume you're tracking user ID along with list item, yeah?
×
×
  • 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.