[Solved] how to post data to two php pages simultaneously & parallely execute them? [closed]

You can send two ajax request using javascript. Using jQuery it will be something like $.post(‘first_page.php’, {data: ‘Some Data’}, function(response) { // process 1st page }); $.post(‘second_page.php’, {data: ‘Some Data’}, function(response) { // process 2nd page }); solved how to post data to two php pages simultaneously & parallely execute them? [closed]

[Solved] How to get acknowledgement email once after user read it using PHP? [closed]

You Tagged phpmailer so I’m guessing you’re using the phpmailer class. There you just have to $mail = new PHPMailer(); $mail->IsMail(); $mail->From = $senderEmail $mail->ConfirmReadingTo = $confirmEmail … body etc here … if your are not using phpmailer you have to add the “X-Confirm-Reading-To” header to your email. solved How to get acknowledgement email once … Read more

[Solved] php – Regular expression to validate this string [closed]

$string=”1234-ABCD-EFGH”; preg_match(“~[0-9]{4}-[A-Z]{4}-[A-Z]{4}~”, $string, $matches); print_r($matches); This code will output the $matches array that contains the match information. preg_match will return true or false depending on whether the string matched. If you prefer to also match lower case characters, use this one: preg_match(“~[0-9]{4}-[A-Za-z]{4}-[A-Za-z]{4}~”, $string, $matches); 1 solved php – Regular expression to validate this string [closed]

[Solved] Set checked checkbox from array [closed]

Try this code – <?php $all_data = [“admin”,”member”,”editor”]; $selected = [“admin”,”member”]; foreach($all_data as $value) { $checked = in_array($value, $selected) ? ‘checked=”checked”‘ : ”; echo ‘<input type=”checkbox” name=”chk[]” value=”‘ . $value .'” ‘ . $checked . ‘>’; } ?> solved Set checked checkbox from array [closed]

[Solved] PHP script ,MySQL

Change your code from $query = “SELECT COUNT( id ) FROM scores WHERE id = $id;”; $result = mysql_query($query) or die(‘Query failed: ‘ . mysql_error()); to $query = “SELECT COUNT( id ) as `total_ids` FROM scores WHERE id = $id”; $result = mysql_query($query) or die(‘Query failed: ‘ . mysql_error()); after that you need $count = … Read more

[Solved] Make calculations in csv with php

I would maybe do it more simple. If you didn’t know how many columns you could do the extra loops to get column names, but it does not look necessary. $output = “datetime, value1, value2\n”; // Column names while ($row = mysql_fetch_array($sql)) { $output .='”‘ . $row[0] . ‘” ,’; $output .='”‘ . $row[1] . … Read more

[Solved] Button not doing anything on click. How come? [duplicate]

Your strings are quoted wrong, your second double quote after on click = terminates the string, I havent tested my soloution but you need something like (below) You need to escape double qoutes if it is literally part of the string echo “<tr><td colspan =’2′><center><input type=”submit” value=”Reply” onClick=’window.open(\”post_reply.php?cid=$cid&tid=$tid\”)’ />”; 0 solved Button not doing anything … Read more

[Solved] What is the best way to have only single database connection throughout whole android app life?

THere is no way, not how you’re doing it. You’re making individual HTTP connections for each request. Unless your webserver only maintains a single instance of a database connection for all requests, its going to create new ones for each request (this would also mean your website only has a single server- in other words … Read more