-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
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.
-
You need to open a terminal session on the MySQL server and run it from the command line.
-
Read up on GRANT.
-
Issue to save values in database with multiple checkboxs in CRUD
gw1500se replied to AccuCORE's topic in PHP Coding Help
You can't store an array in a database as a single column. I already suggested what to do. Alternatively you can store the array in a join table where each item is a column. -
If you have PHPAdmin with admin rights then you need to check GRANTs for user 'apache'. That is likely the crux of your problem.
-
Where you are running it as a client is irrelevant. Is the MySQL server on Windows or Linux? Is the httpd server Windows or Linux? Are they the same server?
-
Issue to save values in database with multiple checkboxs in CRUD
gw1500se replied to AccuCORE's topic in PHP Coding Help
Your code is a bit confusing so I'm not sure I am following what you are trying to do. You convert $_POST["active"] to a comma separated string ($newvalues) but when you store it in the database you are binding an array ($_POST["active"]) to a column. You can't store an array per se as a column in MySQL. You should be binding $newvalues to a string column in your database. -
Are you on Linux? If so 'apache' is running the script, not you. I am referring to 'mysql' from command line.
-
But the user running the script may not. Did you check as I suggested?