-
Posts
1,041 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
With Ajax, opening a PHP function on the same page without JQuery.
gw1500se replied to JoshEir's topic in PHP Coding Help
Not sure what you are asking. This is all done on the client side so JavaScript can control what is displayed. Calling a PHP function with Ajax does not change anything on that page unless the JavaScript makes the change. Keep in mind that PHP is server side only and is stateless. JavaScript is client side and can control the current page completely. Thus a different JavaScript/Ajax function will not effect this function. -
Looks like you have a lot of errors to investigate. You need to clear them up first obviously. The "not a function' errors are likely a syntax problem. As a guess, there may be parens () in those references rather than brackets [].
-
Turn on error reporting. error_reporting(E_ALL);
-
This worked till I added some code, Now it does not,
gw1500se replied to guymclarenza's topic in PHP Coding Help
//this could be the problem it appears in the error file $alreadyCrawled() = array(); $crawling = array(); It is. Look at the second assignment that did not produce an error. See the difference? However, telling us it does not work is of no use. What new code did you add? What doesn't work? Do you get an error or do you get a different output than you expect? If so what is that? -
Session Start - Headers already sent. What am I doing wrong?
gw1500se replied to MAtkins's topic in PHP Coding Help
I don't know what they use so you probably need to contact their tech support. As a test, remove the session start then look at the page source to see if there is anything (including white space) before the text. They may be outputting headers or something ahead of your page. -
Session Start - Headers already sent. What am I doing wrong?
gw1500se replied to MAtkins's topic in PHP Coding Help
Works for me with Apache. There MUST be some white space or an unprintable code that is being output first. Is this being called from another page or called directly with a URL (that is the way I tested it)? Also, what HTTPD server are you using (Apache, IIS)? -
Display pictures from a folder in specific way -php
gw1500se replied to cyb-php's topic in PHP Coding Help
Try using <div> or <p> rather than <br />. that having been said, I'd use a table myself. As an aside, syntactically it is preferred to use <br /> rather than just <br>. -
I would say you are looking at it backwards. Don't try to chase it back. Instead use a session array variable and on each page that goes to a new one you want to track, add the referring page to the session array before forwarding to the next page. That array will then show the sequence of pages used to get to the current one. Alternatively you can have the new page add the referrer to the array to collect each page visited during that session.
-
This is an SSL certificate issue. Make sure you have OpenSSL’s default CA bundle implemented properly. Alternatively, though not the best idea, you could turn off SSL verification by setting options 'verify_peer' and 'verify_peer_name' both to false.
-
Barand's code will do it.
-
This comes back to the earlier question. Why do you need the quotes in the first place?
-
$fields[$k] = "\"".$v"\"";
-
The link to the manual has examples.
-
Use array_count_values to determine which keys occur how many times. If you want an array of just the counts you can build an array from that with just the values.
-
First please use the code icon (<>) for your code and specify PHP. As for your specific problem, I don't know how those variables are generated (that is where the space is coming from) but simply using rtrim should solve the problem. $fields[$k] = rtrim($v);
-
Just for the record here is the algorithm in PHP. $d=sqrt(pow($q2-$1q1,2)+pow($q4-$q3,2)+pow($q6-$q5,)+...); What you use for those values and how many is up to you.
-
The algorithm is not difficult to implement in PHP but it seems the problem (for me) is what values to use. Between what values are you looking to test similarity? Point 1 and 2 of room 413 or point 1 of rooms 413 and 415? Each point can have only 1 value, not a range of values.