Quantcast
Channel: PHP Website Development » FALSE
Browsing all 34 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Update several columns if variable is not empty

I know how to update the rows in my database, I know how to transfer data from one page to another, but what I don’t know is a good way to update the database of several different rows as long as the...

View Article



Image may be NSFW.
Clik here to view.

`static` keyword inside function?

I was looking at the source for Drupal 7, and I found some things I hadn’t seen before. I did some initial looking in the php manual, but it didn’t explain these examples. What does the keyword static...

View Article

Image may be NSFW.
Clik here to view.

Codeigniter html to database question

I’m working on a website witch allows users to submit blog posts, however, there seems to be a little problem. I’m using global_xss_filtering (TRUE) so everything will be filtered out.But, when I’m...

View Article

Image may be NSFW.
Clik here to view.

Codeigniter flashdata – am I using it correctly?

I learned about flashdata and decided to use it to display messages based on database interactions. For example if no rows are affected I want to display Post id is invalid or does not exist!In my...

View Article

Image may be NSFW.
Clik here to view.

CreateRecurringPaymentsProfile NVP works on PayPal Sandbox,

When I send this NVP on live PayPal it returns Error code 10527 “This transaction cannot be processed. Please enter a valid credit card number and type.”I made a PayPal API class in PHP to facilitate...

View Article


Image may be NSFW.
Clik here to view.

Data validation package for PHP?

Stupid question.I’ve got a project that I’m working on in PHP; it’s a registration form for a customer that will eventually write to a MySQL database. I’ve got the form doing data validation for the...

View Article

Image may be NSFW.
Clik here to view.

What does a sql-query in php on an empty table return?

I have the following PHP script :

View Article

Image may be NSFW.
Clik here to view.

Is the PHP function error_log() safe to use?

I want to insure that there are no race conditions introduced by using a custom PHP error handler. To that end I want to know if I can rely on error_log() or if I need to use some other file-locking...

View Article


Image may be NSFW.
Clik here to view.

PHP page hangs on this block of code

Recently, with no changes to my code, my PHP page started to hang at a certain area. It generates all of the HTML on the page right before this line:$tickerJSON =...

View Article


Image may be NSFW.
Clik here to view.

Check if file exists before showing image?

I need to make an image gallery with a variable number of images. I’m making a loop that checks for a lot of image names, like image1, image2, image3 and so on. I need to make a condition so that it...

View Article

Image may be NSFW.
Clik here to view.

Foreach loop failure

The first loop gets the 2 values for hostkarma just fine. The 2nd loop fails for accredit.habeas and I get “Invalid argument supplied for foreach() on line 11″. Where am I going wroge with the...

View Article

Image may be NSFW.
Clik here to view.

replace all substring instances with variable string

If you had string ‘Old string Old more string Old some more string’and you wanted to get‘New1 string New2 more string New3 some more string’how would you do it?In other words, you need to replace all...

View Article

Image may be NSFW.
Clik here to view.

PHP MVC Form Processing in witch action?

I am wondering about HTML form processing in MVC. I use Kohana at the moment, but the question is generic type. So i wanna gather opionions and recommendations about two approaches : Keeping procesing...

View Article


Image may be NSFW.
Clik here to view.

Undefined variable: CodeIgniter view?

i have a problem with a undefined variable, this is my code:My Modelfunction call_menu_det() { $q = $this->db->select(‘id_menu_det, nombre_rol’)->from(‘tb_menu_det’); $ret['rows'] =...

View Article

Try/Catch not working with this PDO query

I have a script that I am updating by replacing the inline mysql queries with PDO prepared statements and queries. When the query is correct or returns a result, it works fine. However, when there is...

View Article


What could cause a MySQL error for a single client that cann

Possible Duplicate:mysql_fetch_array() expects parameter 1 to be resource, boolean given in select This issue pretains to SMF ( Simple Machines Forum ). One user cannot login with his details and is...

View Article

Image may be NSFW.
Clik here to view.

Convert spaces between PRE tags, via DOM parser

Regex was my original idea as a solution, although it soon became apparent a DOM parser would be more appropriate… I’d like to convert spaces to   between PRE tags within a string of HTML text. For...

View Article


Image may be NSFW.
Clik here to view.

php curl vs cli curl, posting xml

UPDATED THANKS TO ANSWERS:Can someone point out the difference between:$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $api_root);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch,...

View Article

Image may be NSFW.
Clik here to view.

php curl vs cli curl, posting xml

UPDATED THANKS TO ANSWERS:Can someone point out the difference between:$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $api_root);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch,...

View Article

error when selecting row from db

I’m trying to select data from a certain row in a my sql db. This is the code im using:mysql_connect($hostname,$username,$password) or die(‘connection error ‘.mysql_error()); mysql_select_db($dbname)...

View Article
Browsing all 34 articles
Browse latest View live




Latest Images