Latest web development and programming questions and answers

675

php - Regex to match all closing HTML tags

Solution:Use this regex: </.+?> Copy code or /<\/.+?>/ Copy code That will do.

Read More

256

Database logic for conversation (like Forum) PHP, MySql

Solution:I would not have the parentID point to the comment that precedes it, that's bad practice all around. The parentID should point to the topic and then wh

Read More

477

Sending mail using PHP (to the one that puts the email in the EMAIL INPUT)

Solution:Use this $email = "youremailaddress"; $yoursubject="Something ..."; $yourmessage="Something else..."; mail($email, $yoursubject, $yourmessage); Cop

Read More

438

Google PHP Client API: Insufficient Permission

Solution:The apps#list method requires authorization with the scopehttps://www.googleapis.com/auth/drive.apps.readonly. Just add it to the array of scopes: $cli

Read More

290

apache - PHP Warning: Cannot modify header information - headers already sent by

Solution:It's because you specified a doctype before the header. You cannot output a header after the payload has been sent. So change it to: <? if(file_

Read More

723

php - How do i check if my file was uploaded and then echo my file uploaded statement to paticular part of my website

Solution:move_uploaded_file returns true on success. In upload.php; <?php .... $res = move_uploaded_file($_FILES['file']['tmp_name'],"./medetrax_

Read More

928

php - Regular Expression working in online test tool, but not in my app

Solution:Just add an escape: preg_match('/[\/\\\](\d+_\d+_\d+_\d+)[\/\\\]/', $file, $matches); // here __^ and __^ Copy code

Read More

771

php - Regarding unique username

Solution:My answer is going to address the specific problem you had regarding: I need a solution from which i generate a unique username with available details

Read More

986

PHP page with embedded HTML displaying extra column

Solution:You need to close the td's echo "<td>" . $users['middlename'] . "</td>"; echo "<td>" . $users['lastname'] . "</td>"; Copy code

Read More

849

variables - Access PHP Object from a loaded PHP in POST request

Solution:You can store it in the$_SESSION and access it on the other pages. On each page that you will use it you have to include the class. So on both main.php

Read More

898

php - JavaBridge BIRT Send Email

Solution:The sending process doesn't have anything do to with CSS - that's entirely up to the client, though bear in mind that CSS support in email clients is e

Read More

731

javascript - call parameterised function on dynamic button click in php

Solution:First of all, dont combine in your mind JS code and PHP code into one. Please set in your mind that JS code is executes on Browser which is provided b

Read More

248

php - if-else statement not working correctly in while loop

Solution:I can't see any query which make the difference b/w admin and member, your code simply retrieving admin column and going through every value and printi

Read More

760

mysql - How to Get data that been clicked into next page in php?

Solution:As display in first script, you are not getting any result of index: id, and you have passed parameter in URL. Now in second script you are using id as

Read More

245

php - How to split text in array by comma if comma is in text value

Solution:Try this $str = '0, "Some, text", 0.23, 4'; $new = str_getcsv($str, ",","",","); echo "<pre>"; print_r($new); Copy code Output Array ( [0] =&

Read More