-
Posts
15,265 -
Joined
-
Last visited
-
Days Won
431
Everything posted by requinix
-
PHP can't do buttons on pages, nor does it have any idea what "responsive" means. But if you want to use PHP to output some HTML for a button, then couple that with some Javascript to do an AJAX form, that's perfectly fine.
-
This is just the code that shows the form. You'd also have to deal with the code that handles the (merged) form - to make sure it understands the new fields that are being included. There's also the possibility the merged HTML isn't correct, so you should also post what you came up with for that.
-
Fatal error: Uncaught Error: Class "mysqli" not found...
requinix replied to Jagboy's topic in PHP Coding Help
Then you do have it installed. What code isn't working and what is the error message? Please make sure to copy and paste exactly what you have/see. -
Fatal error: Uncaught Error: Class "mysqli" not found...
requinix replied to Jagboy's topic in PHP Coding Help
mysqlnd and mysqli are not the same thing. Does phpinfo() specifically say that mysqli is there? -
Why my web page cause crash in Chrome and slow in Firefox?
requinix replied to eaglehopes's topic in Other
Works on my machineā¢. Chrome never even stuttered. But which sub-blog specifically? I didn't see any with >100 pages. -
You can't embed files through C:\ if you're running this from a website. The "dir" that you use for the embed has to be a URL. Probably "/Docs/Manual/Honda". No, you can't also use that with scandir.
-
Fatal error: Uncaught Error: Class "mysqli" not found...
requinix replied to Jagboy's topic in PHP Coding Help
Sounds like you don't have the mysqli extension installed or enabled... -
Any errors in the browser's developer console? And what year was this page made? 1995? Looking at it makes me want to take a shower.
-
What's the value in $response? Maybe it's some HTML page?
-
FULLTEXT searching just does not do that. It doesn't offer particularly sophisticated features: it's oriented towards taking an input list of words and trying to find things that are relevant to those list of words. "M/C" isn't going to work because those aren't words. Prices aren't going to work because those aren't words. "Within 10 words of each other" isn't an option.
-
I think ext-http means the pecl_http PECL extension. If so, you get that through installing PECL and then using it to install pecl_http. https://pecl.php.net/package/pecl_http
-
Sounds simple enough: when someone posts, look at the last post and calculate a number of points to award the poster. Do you have a more specific question?
-
1. The 500 error would be due to a syntax error. I think your indentation in that $headers array is wrong - like it has non-breaking spaces instead of regular spaces. You may have copied this code from somewhere? Delete the leading spaces and type them out yourself. 2. The list of headers should only contain the Authorization - not the GET because that's not a header, and like I said not the Content-Type either (I think their docs meant to use an Accept...) 3. This is a GET request. It does not POST anything so there shouldn't be any "POST" options. 4. You're going to want CURLOPT_RETURNTRANSFER at some point later. Without, what the API returns will go to your browser, which is handy for the moment but not what you'll need. The other problem is the URL. You're supposed to put a value in for that ":survey_id". Then add that path to the api.getfeedback.com you have below and put the whole thing in for the CURLOPT_URL. It's the same value that you would put into your browser to test out the API (if not for the fact that the authentication wouldn't work). And please, don't post your Bearer token again. Protect it like it were your bank account number.
-
Sending a Content-Type with a GET request is incorrect so that's not right. And I'm not sure why you're reading books on JSON when your issues are with cURL and PHP. Here is the starting point of the documentation for how to use cURL in PHP. Check a couple of the examples, and Google, for the basic way to use it. It's pretty simple for a request like the one you've shown. What you'd need to do special is add a custom Authorization header to the request. That's done through curl_setopt() and one of the options in there. Write some code, give it a try, and see how things go. If you have problems then post what you've written and describe what's happening when you try it.
-
Why can't I access the fonts directory from PHP?
requinix replied to SLSCoder's topic in PHP Coding Help
You can, but it depends on configuration. Or a lack of, such as for the open_basedir PHP setting that would restrict your code from doing anything outside of a specific set of directories if it had been set. I don't know where your PHP logs are. Start looking at /var/log. -
Why can't I access the fonts directory from PHP?
requinix replied to SLSCoder's topic in PHP Coding Help
Also, take a look at your PHP error logs, in case there's anything in there that might be relevant to this issue... And by the way, even if this isn't shared hosting and you own the box, if you need the Verdana font then just bundle it into your application's codebase. Far more reliable than making sure you have fonts installed on what should be a headless box. -
Subracting a number from decimal value in mysql
requinix replied to PNewCode's topic in PHP Coding Help
DECIMAL(65,0) means it can store a number with 65 digits and 0 after the decimal point. -
Sure: upgrade to PHP 8 and see what it complains about. Not on the real site, of course, but in some development version of it. That's really the most effective method. I don't know what "tags" are, but the online documentation has migration guides. Go through each guide in sequence; if you want to upgrade to latest, which is 8.2, then you need the 7.3->7.4 and 7.4->8.0 and 8.0->8.1 and 8.1->8.2 guides.
-
-
how to read body content of a chucked CSV file sent to me
requinix replied to grjoseph's topic in PHP Coding Help
Then let's go back to the beginning: What did the "request catcher" capture? What is your current PHP code? -
how to read body content of a chucked CSV file sent to me
requinix replied to grjoseph's topic in PHP Coding Help
Where you are getting "upfile" from? I don't see that anywhere in the sample request you showed. The actual name was content-disposition: form-data; name="file"; filename="dip-01GQJAYVE75QE6QE1J1P3F892D.csv" "file" -
how to read body content of a chucked CSV file sent to me
requinix replied to grjoseph's topic in PHP Coding Help
That looks like a regular ol' file upload. -
Each button needs to know which result it's supposed to delete. Since you're doing this with AJAX you have a lot of flexibility in how to go about it, but my preferred is a data attribute. <button data-deletes-record="(id goes here)">Delete</button> With jQuery, you can then wait for a click event on a button with that attribute, $("#allRecords").on("click", "button[data-deletes-record]", function() { Inside that you can grab the ID with .attr() or .data() and then pass it through AJAX...
-
If you have to urldecode a query parameter yourself then you are doing something wrong.