I have a form, depending on the selected value of my <select> box I would like to send to a different page.
I do not know the best way to do this, but I am thinking that maybe the best way is to have an intermediate page to always post to, then have the intermediate page check the value sent from the <select> box and forward the POST va...
Hello everyone,
From a string that contains a lot of HTMl, how can I extract all the text from <h1><h2>etc tags into a new variable.
Possibly using preg_match_all and sending the matches to a single comma delimited variable.
Thanks guys.
...
Is there any pitfalls or downsides to relying on $_SERVER['HTTP_ACCEPT_LANG'] for language detection?
...
Using md5 on a string always produces an alpha-numeric encrypted result, ie: no symbols.
However, when I using the php crypt() function, specifically the CRYPT_MD5 (and it is on, I've checked) with a salt, the supposed md5 hash it returns does not look like an md5 hash.
For example:
if I md5 the string 'password', I get:
$pass = md5(...
Hi,
First of all I am aware that e-mail recall rarely works, and then usually only with Microsoft Exchange server.
Despite the limitations, a client has requested this feature.
My understanding is that the RECALL functionality in Microsoft Exchange is a proprietary extension of the SMTP protocol, and sends a new e-mail asking for a ...
Hi,
I have a website that offers a service to subscribed members. It has been reported to me that one of the pages that has a form used to submit data to a mysql database has not been displaying saved changes.
The form should display back data that has been stored in the database. (After the page has been submitted)
I thought this was...
Hi,
I have a page that I am performing an AJAX request on. The purpose of the page is to return the headers of an e-mail, which I have working fine. The problem is that this is called for each e-mail in a mailbox. Which means it will be called once per mail in the box. The reason this is a problem is because the execution time of th...
Hi,
I use haXe to generate php code. (This means you write you code in the haXe language and get a bunch of php files after compiling.) Today a customer told me that he needs a new feature on a old project made with haXe. He also told me that he altered some small things on the code for his own needs. Now I first have port his changes t...
hello,
I am currently playing around with cookies in my website, the first thing I do is run a check as to whether the user has cookie, if they dont I display a menu wth 3 options if they click it creates a cookie, but if then quit the browser the cookie is destroyed, here is my code,
function createRandomId() {
$chars = "abcdefg...
Is there any Perl equivalent for php's array_chunk()?
I'm trying to divide a large array into several smaller ones.
Thanks in advance.
...
I can not get pre-population to work on an embedded form...
If I use the regular url... it works...
https://spreadsheets.google.com/a/DOMAIN.org/viewform?hl=en&formkey=12345&entry_3=John&entry_4=Doe
but for a google apps account on an embedded form - does not work
Loading...
Form appears in the webpage, but the additiona...
This is the test and the response I get. I think this could be problematic and should throw an error or a notice but I cannot understand why is tolerated.
<?php
$test = array( 0 => 'test', 1=> &$test );
var_dump( $test );
// array(2) { [0]=> string(4) "test" [1]=> &array(2) { [0]=> string(4) "test" [1]=> &array(2) { [0]=> s...
Maybe I am overlooking something, but I stumbled across this:
$employees = new stdClass();
$employee_id = 5;
$employee = array();
$employee["id"] = $employee_id;
$employee["name"] = "John;
$employees->$employee_id = $employee;
Now I want to change the employee Name:
$employee = $employees->$employee_id;
$employee["name"] = "Tom";
...
Hello,
echo "<table><tr>";
while (list ($key, $val) = each ($users)) {
echo "<td>$val</td></tr>\n\n";
}
echo "</tr><tr>";
while (list ($key2, $val2) = each ($enable)) {
echo "<td>$val2</td></tr>\n\n";
}
echo "</tr></table>";
I want to format this into table with side by side where should be
$val $val2
Currently its in
$val
$val...
is it necessary to use mysql_close() at the end of a query in PHP?
...
I'm using mysqli.
When I echo mysqli_real_escape_string($db,mysqli_real_escape_string($db,'"'));
which one of those will be the output:
1. \"
2. \\\"
?
Is there a safe way to check whether a string has been already escaped?
Unfortunately, I cannot test at present as I cannot access MySQL for 24 hours.
...
Hi ,
I need some help ,
All I need to do is change "HERE" to a the value of $date
$line1 = $sxe->addChild("date","HERE");
How can I add the value of $date into the area were "HERE" is ?
Please help
...
While the question may seem fairly basic I seem to be at a loss to actually find anything that fits my needs, which are:
Skinnable (although not 100% required)
Controllable through javascript (start, stop, change track)
Event triggers for custom functions (on track finish mainly)
Actual documentation - rather that 'it can do this, but ...
I'm trying to parse a simple JSON string, but I'm not used to do it from PHP. To do my testo I've wrote a js page where the data is created, sent to php page and returned back to do some test.
how can I access to json data from PHP and return them back?
the string from jQuery:
var json_str = '{"id_list":[{"id":"2","checked":"true"},{"...
Hello, i have a really complex query (mysql + php) and i would like to know the easiest way to sum columns and rows of a table apart from using SUM(x).
Maybe a javascript could help.
Thanks in advance.
...