Search found 104 matches
- Thu Apr 08, 2021 12:55 am
- Forum: PHP General
- Topic: PHP xml-rpc problem using ripcord library
- Replies: 5
- Views: 113
Re: PHP xml-rpc problem using ripcord library
Do you have a vendor folder in your codebase? Composer should have created one, and the path in your require_once command should point to it.
- Wed Apr 07, 2021 2:27 am
- Forum: PHP General
- Topic: PHP xml-rpc problem using ripcord library
- Replies: 5
- Views: 113
Re: PHP xml-rpc problem using ripcord library
PHP uses a user defined autoload function to find the code for classes as you instantiate them. If you're using composer, the autoload for your included packages is probably at "vendor/autoload.php". Change you require_once line as follows: require_once('vendor/autoload.php'); And let us know how th...
- Mon Apr 05, 2021 4:57 am
- Forum: mySQL & php coding
- Topic: can you resolve my website problem
- Replies: 1
- Views: 98
Re: can you resolve my website problem
Laravel can't find the route you're asking for. What does your routes/web.php file look like?
- Thu Apr 01, 2021 2:36 am
- Forum: PHP General
- Topic: 2 Strings into key/value array help!
- Replies: 3
- Views: 195
Re: 2 Strings into key/value array help!
Looks like you've got it covered then.
- Wed Mar 31, 2021 11:02 pm
- Forum: PHP General
- Topic: 2 Strings into key/value array help!
- Replies: 3
- Views: 195
Re: 2 Strings into key/value array help!
You need to split your fields and data, trim any erroneous whitespace , then combine the fields and data into your structure . The code below shows how it goes together: $strData = "jamie,smith,2003-12-23,male, 2 My Street, MyTown,MyCounty,EH12 3RE,1234,more strings"; $strFields = "firstname,lastnam...
- Sun Mar 28, 2021 11:54 pm
- Forum: PHP coding => General
- Topic: php 7.4 errors
- Replies: 3
- Views: 216
Re: php 7.4 errors
I'll fix it for £50.
- Thu Mar 18, 2021 2:57 am
- Forum: Server installation and configuration
- Topic: set website name for intranet on linux apache
- Replies: 1
- Views: 281
Re: set website name for intranet on linux apache
You need to configure your network DNS to map your chosen intranet hostname to the server's IP. This isn't a server config question so much as it is a network config question; you might have better luck asking on a network management forum.
- Wed Mar 17, 2021 12:56 pm
- Forum: mySQL & php coding
- Topic: How to print the read php script in JSON format
- Replies: 3
- Views: 308
Re: How to print the read php script in JSON format
You need to store the results of your query to an array so you can output it twice; a quick way to do this is with mysqli_fetch_all . Replace the last while loop in your code with the following: // Read entire query result into single array $output = mysqli_fetch_all($query, MYSQLI_ASSOC); // Instea...
- Tue Mar 16, 2021 12:22 am
- Forum: mySQL & php coding
- Topic: trying to access array offset on value of null
- Replies: 2
- Views: 186
Re: trying to access array offset on value of null
<?php while ($courses = $get_all_courses_data->fetch(PDO::FETCH_ASSOC)) { ?> <option value="<?php echo $get_courses['courses_id']; ?>"><?php echo $get_courses['courses']; ?></option> <?php } ?> In this code you are assigning a value to $courses in your while loop, but you're looking at $get_courses...
- Mon Mar 15, 2021 6:18 am
- Forum: PHP coding => General
- Topic: Get requests with a url that contains a Get request
- Replies: 1
- Views: 217
Re: Get requests with a url that contains a Get request
The function urlencode will convert the URL to something you can safely send in a GET parameter. You need to be careful with the string's content though. For instance, in your example the "location" part of the query is already encoded: Boston,%20MA . The %20 is a url encoded space character. If you...
- Thu Mar 11, 2021 12:32 pm
- Forum: JavaScript
- Topic: create json for post ajax to PHP
- Replies: 1
- Views: 243
Re: create json for post ajax to PHP
You can use the PHP function json_decode to convert the input to a PHP object or array. That should be easier to work with.
- Wed Mar 10, 2021 11:54 pm
- Forum: PHP coding => General
- Topic: Memory_Limit?
- Replies: 4
- Views: 404
Re: Memory_Limit?
It is likely to be something to do with your code. Pare down the script as much as you can, then include it and the error message in your post.
- Wed Mar 10, 2021 11:52 pm
- Forum: JavaScript
- Topic: suggest way to developing build website
- Replies: 5
- Views: 391
Re: suggest way to developing build website
Security is a MASSIVE topic; many people make their living solely by consulting on web application security. If you want a basic grasp of things, a good start is to read through the Open Web Application Security Project top ten to see the most common pitfalls. These will give you a lot of other dire...
- Wed Mar 10, 2021 1:12 am
- Forum: JavaScript
- Topic: suggest way to developing build website
- Replies: 5
- Views: 391
Re: suggest way to developing build website
If you want to speed up your build times, you need to abstract away the thinking about security; it's a rabbithole and takes a lot of time to get right. It would also be nice to abstract away decisions about routing requests to the correct code; reuse of common UI in your different pages; CRUD opera...
- Sun Feb 21, 2021 8:41 am
- Forum: PHP coding => General
- Topic: Help with login sending to admin panel after validation not working
- Replies: 3
- Views: 395
Re: Help with login sending to admin panel after validation not working
You can't redirect after starting to output markup, since the redirect is a header and these must come before the body of the response. You should extract your logic out of the middle of your html into a section at the top of your script so it runs before you output anything. This should have thrown...
- Sun Feb 21, 2021 6:19 am
- Forum: PEAR and PECL
- Topic: Problem installing mysql_xdevapi on MacOS
- Replies: 2
- Views: 530
Re: Problem installing mysql_xdevapi on MacOS
Have you tried searching your system for the file any.h?
- Thu Feb 18, 2021 8:37 am
- Forum: PHP coding => General
- Topic: Simple Query Question
- Replies: 1
- Views: 399
Re: Simple Query Question
Try checking to see if your query produced an error. $result = mysqli_query($conn, $sql); // Add this line echo mysqli_error($conn); This function call will print out the last error produced by your query, if any. The mysqli extension can be quite unfriendly here; it can take some digging to see whe...
- Wed Feb 17, 2021 1:29 am
- Forum: PHP Scripts
- Topic: mpdf cann't load on real host at $mpdf = new \Mpdf\Mpdf();
- Replies: 1
- Views: 346
Re: mpdf cann't load on real host at $mpdf = new \Mpdf\Mpdf();
You need to turn on errors so you can see what's actually failing. The first section in my article will show you how to do that. That will point you in the right direction, or allow you to show us some more information and let us help you.
- Tue Feb 16, 2021 7:01 am
- Forum: PHP coding => General
- Topic: Check specific MySQL value and print/delete recursively
- Replies: 2
- Views: 512
Re: Check specific MySQL value and print/delete recursively
PHP runs entirely on the server; it can't tell the browser to clear old content like you want. You'd be better doing this in javascript; the only problem there would be representing your data source but that's an easier problem to solve.
- Sun Feb 14, 2021 6:38 am
- Forum: PHP Scripts
- Topic: HTTPS with php session in different page
- Replies: 3
- Views: 701
Re: HTTPS with php session in different page
Are both pages being loaded over https? This can cause problems depending on your PHP configuration.
- Sat Feb 13, 2021 7:22 am
- Forum: PHP coding => General
- Topic: PHP mysql with jquery mobile only get last record
- Replies: 2
- Views: 581
Re: PHP mysql with jquery mobile only get last record
$('#existingListview').empty(); I'm not 100% sure what you're trying to do, but this line will empty your list before adding its record. This means only the last record is left. When doing things like this, I find a good approach is to focus on one part at a time; first you get your data and make s...
- Thu Feb 11, 2021 4:42 am
- Forum: PHP Scripts
- Topic: Write a function.
- Replies: 3
- Views: 529
Re: Write a function.
Your other two questions were specific enough to just need a single trick to solve; this one is a lot more open ended though. If you're just getting started you might want to look at something simpler.
- Thu Feb 11, 2021 2:45 am
- Forum: HTML Basics
- Topic: CSS Styles for HTML element
- Replies: 2
- Views: 582
Re: CSS Styles for HTML element
That's pretty much it. You can use javascript to mess with styles as well, but all you're doing there is manipulating style attributes.
- Thu Feb 11, 2021 12:40 am
- Forum: JavaScript
- Topic: Links in JS
- Replies: 1
- Views: 562
Re: Links in JS
Is there any reason you can't just use proper <A> link elements? These will work much more predictably for users with screen readers or out of date devices.
- Thu Feb 11, 2021 12:01 am
- Forum: mySQL & php coding
- Topic: I need to create a query to the database
- Replies: 2
- Views: 422
Re: I need to create a query to the database
The children list is the unusual part of this query. The MySQL function GROUP_CONCAT can help you here. GROUP_CONCAT will concatentate a column's values by your query's GROUP_BY clause, giving you the result you want. To incorporate this part into your overall result, you need to treat it as a separ...