PHP is an open-source server-side scripting language widely used in web development. Use this tag for questions about PHP classes, methods, functions, syntax and use.

learn more… | top users | synonyms (6) | php jobs

0
votes
0answers
2 views

htmlspecialchars decode encode php mysql

I posted some inputs with special characters. Here are some input example i'm trying to insert into db: <input type='text' name='address' value ='P. 34/1 Ap. 4/4 Rome, "xxx" street'> <input ...
0
votes
0answers
4 views

htaccess redirect non existing dynamic pages magento

I am using magento and want to redirect old product urls to catalogsearch. I have written this code but its not working. RewriteCond %{QUERY_STRING} .*\bid_ProductURL=([^&]). RewriteRule ...
0
votes
0answers
7 views

Customizing Zend Framework 2 Validator Error Messages

I've got an Input Filter whose validator config for an email field looks like; 'validators' => array( array ( 'name' => 'EmailAddress', 'options' => array( ...
0
votes
5answers
48 views

Javascript passing a variable to PHP

What I'm trying to do is use the below javascript to pull a php page into my html. This works, but what I need and struggling to do is use javascript to send a variable to php so I can use mysql to ...
0
votes
0answers
9 views

Magento OnePage checkout Undefined Variable

A few weeks ago I had a server crash, and had no real backups so everything had to be recovered manually. One of those things was a Magento store. I've got all of the files and database restored, ...
0
votes
2answers
18 views

PHP fwrite over-riding whole file

Okay so basically the script works, but every time i refresh the data.txt file is over-written, i want it to add each individual entry into the data.txt in a new file. example: 1.1.1.1 July 18th @ ...
0
votes
1answer
21 views

How to use Closure as an Anonymous Function like on Javascript?

I have a question, I didn't clearly understand what Closures uses on OOP, but I did something like this: <?php /** * */ class Xsample { public static $name; public static $address = ...
0
votes
1answer
40 views

No output for multiple queries in mysql

We dynamically generate a sql file which contains one big insert query. This file will be run periodically from a PHP app with the following command: mysql --force -u foo -pbar demo < ...
-4
votes
0answers
26 views

php Warning: mysql_fetch_array() expects parameter 1 top 10 [duplicate]

<?php require_once("connect.php"); $results = mysql_query("SELECT username from dnnc order by Level DESC LIMIT 10"); while ($row = mysql_fetch_array($results)) { echo $row['username']; } ...
0
votes
0answers
11 views

404 error when accessing index.php - zend framework 2

I have installed Zend Framework and made it running (apache server) but Im experiencing following problem. Whenever I try to access http://localhost/public/index.php I get 404 error. But when I try ...
0
votes
1answer
26 views

Can I dump database with mysql (not mysqldump)?

I have a server where I have access to mysql but not mysqlimport or mysqldump. It just says "command not found" and whereis reports nothing. I tried dumping the database with PhpMyAdmin but the dump ...
1
vote
2answers
37 views

How to stop form submission after validation has suceeded

I was wondering if there was a way I could stop the form from being submitted normally after Jquery validation has actually succeeded. I would like some other function to take care of submitting the ...
0
votes
0answers
23 views

Creating New Function - MySQL 1-M - Return M in PHP

I'm creating a function to help me return 1-M (One to Many relationship) results from my database. What I want to achieve: I have a form with a Location dropdown. I want a function that will take ...
0
votes
2answers
44 views

unable to access object function [on hold]

I have the following class, which i am including in a view class FieldOptions extends data { public function FldOptions() { $DataSet = array(); $sql = "SELECT query"; ...
0
votes
0answers
28 views

displaying combo box for Categories

I've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question. Below you can see an overview of my goal. i want ...

1 2 3 4 5 27663
15 30 50 per page