69 Answered Questions for the topic PHP



How to secure database passwords in PHP?

When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs... more


Get first key in a (possibly) associative array?

What's the best way to determine the first key in a possibly associative array? My first thought it to just foreach the array and then immediately breaking it, like this: foreach ($an_array as... more


How do I get the current date and time in PHP?

Which PHP function can return the current date/time?

How do I easily highlight the syntax of PHP code in Word?

How do I easily write and syntax-highlighted PHP code (or any others programming language) in a Word 2009 document?


Why doesn't this code simply print letters A to Z?

a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv... more


How to pass variables and data from PHP to JavaScript?

I have a variable in PHP, and I need its value in my JavaScript code. How can I get my variable from PHP to JavaScript? I have code that looks like this: getValue(); // makes an api and db... more
Php Sql Mysql


Error updating record: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax t

<?phpsession_start();require('connect.php');if(isset($_POST['submit'])){$id = $_POST['id'];$username = $_POST['username'];$name = $_POST['name'];$email = $_POST['email'];$password =... more

Should a CMS be used for a photographer portfolio web site?

My friend photographer asked me to develop a portfolio web site, and I'm wondering if a content management system (CMS) should be used for this purpose? The website contains a minimum of dynamic... more


Showing Featured Item From the Database?

I have database table as below. id, bungalow_name, type, address, featured A bungalow can be featured in the home page. If a bungalow is featured, `featured` column has the value `1`. I have 50... more


How do I convert a string to a number in PHP?

I want to convert these types of values, `'3'`, `'2.34'`, `'0.234343'`, etc. to a number. In JavaScript we can use `Number()`, but is there any similar method available in PHP? Input ... more

What is the Real Quickbooks Online API?

I've been researching this for a while, and I really can't find the right solution. I found this PHP API that is supposed to help solve all these issues, but it doesn't work - or it's not clear how... more

Is PHP front end or back end?

Php Sql Mysql


How do I get the size of a particular table in MySQL database?

Php Gzip Apache


Simultaneously enable gzip and $STR_REPLACE in CGI in apache

I have a code in my CGI script for text replacement (for example replace 'red' with 'blue')$STR_SEARCH='red'$STR_REPLACE='blue'I am using the below code in .htaccess for enable replace function:... more


PHP Loop Help

Write a small program (Code) in PHP language using for loop which prints from 1 to 100.


PHP Array Help

The associative Array in PHP language can be define/declare through Array() function and can take any number of key-value pairs. The indices/keys of an associative array can be numeric or... more


PHP Basic Help

Write a small program (Code) in PHP language which declares a variable that stores some amount and calculate the “Zakat” on this amount.Note: The “Zakat” can be calculated through formula “(Amount... more


visual basic: get php Query from text box

How can I get url Query from text box and put it line by line in richtextbox. exemple:I want to get query from textbox1.text :http://www.mywebsite.com/test.php?id=4&url=3&bakgroundid=951and... more


eCommerce with Dreamweaver, Please help

I have a question , Currently i Have a store Locally. However i want to put them online and sell through my website. I created a site with Dreamweaver. Basically i dont want to write code for each... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.