Quantcast
Channel: PHP Freaks: PHP Help
Browsing all 13200 articles
Browse latest View live

mysql_connect function not responding?

First of all i'm new to this.    the mysql_connect('localhost', 'root', '') always seems to run even when the values are wrong.  I assume that something is wrong here?    I am running MAMP.  

View Article


5.4 upgrade - malformed header from script.

Hi all, I'm hoping to get some help with this problem. I'm in way over my head, but hate to trash my sites over something that is likely a simple fix. I built two sites several years ago for my...

View Article


Prepend a $key => $value pair

Hey guys,   I'm trying to run a while loop for an array that includes an ID value in each row. I'm trying to temporarily disable that value while I perform a foreach loop, then prepend the value back...

View Article

posting image path to MySQL

So here is my problem, I'm developing this for my business and what I'm doing is in an inventory form I display the image of the item in inventory, when I add a new item to the inventory the image is...

View Article

Image may be NSFW.
Clik here to view.

Preventing the double time booking in Reservation

Hi. I am having problem based on my reservation system, I want to prevent it from double time booking. If the one data is choosing 12pm to 1p, and if I register again the same time it'll still be...

View Article


php oop get sibling method object

Hi guys, I am new to php oop,  I am trying get an object of sibling method inside a class, seems not working. here is how i do it. class Upload extends Base_controller{  private function sql () {...

View Article

FTP input vulnerability

Hi there. I was wondering if there was something like an "FTP Injection" just like SQL injection because I was looking at my code today and I noticed this if(file_exists($_REQUEST['filename'])) Should...

View Article

PHP5 Unique data pages for specific items

So i have a car database storing parts for cars and i am in the process of creating a page which will store unique data for each car part chosen from another page(not yet created), at the moment i am...

View Article


Php array comparison and compute

Hi I have these codes that try to compare content of array elements and add 1 for every similar comparison and zero for otherwise. But my codes seem not to be computing the final score, what could be...

View Article


Validating Text Boxes

Hi All,   I have a straightforward page that has about 30 text boxes in it. But... theres always a but...   I want to be able to validate the text before update the record in MySQL. For example the...

View Article

soapClient problem with sequence and generated SOAP

I did some searching on this issue and all the solutions that seemed to be similar did not work for my problem.   Anyways, I need to make a SOAP call with a sequence in it, yet soapClient doesn't seem...

View Article

RecursiveDirectoryIterator with only Folders

The RecursiveIteratorIterator, RecursiveDirectoryIterator, etc. have me going in circles. I'm trying to create a very efficient method of getting a list of all the subfolders in a target folder. Right...

View Article

HTML input form

I'm stumped. does an HTML input form show all the text in it even when there are spaces? I have an input form that holds and address and it's value is filled from a database. and when I grab the info...

View Article


Passing form content

In the following code, When I try to pass questions together with the answers, only the answers are Posted as $_POST, How do $_POST the questions to from the form together with the answers?...

View Article

Can I data scrape / datamine data using PHP?

I'm sure it's possible. I want to go to a website. Input values then copy and paste data it found from that search.    Not even sure where to start.     

View Article


Simple Cookie question

Here's my cookie code:   $offer = $_GET['AID']; $AdID = $_GET['Adwords']; $kw = $_GET['kw']; $combine = $AdID."-".$kw; $Month = 2592000 + time(); if (isset($AdID)) { setcookie(PPC,$combine,$Month); }...

View Article

Image may be NSFW.
Clik here to view.

PHP Shopping Cart Advice

Hey guys and girls,   I am currently following a book to create a PHP shopping cart and I am having trouble passing the data from a form to my cart script that add's the product to the cart.   This is...

View Article


function ping($host)?

Hey guys,   I'm trying to show a few ips are online or not, but the return is always as online. The function I'm trying to use is the one below: <?php function ping($host) { $conectado =...

View Article

Use a foreach loop to iterate through the $emails array, for each element...

The code declares and initializes an array $emails. It contains ve email addresses     1. Calculate the length (number of characters) of the email address. 2. Calculate the number of words in the email...

View Article

Warning: mysql_error() expects parameter 1 to be resource, string given in...

Hi guys, I am trying to run the code below and I end up getting the error above, as am a newby in php, i just can't figure out where am going wrong, can anyone help me please   <?php  require...

View Article
Browsing all 13200 articles
Browse latest View live