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

caching css

Hello!   I have a little question about caching... for now.. i dont use caching for my website. i want to start using it and i found i tuto here   so i'll start to using ExpiresByType I have a...

View Article


changing PHP num_rows method to SQL COUNT

Hi. I was using the method below to count the rows in a table, but I've since learnt I should be using SQL Count.   Old method.... //total number of jobs if ($result = $db->query("SELECT * FROM...

View Article


if statement disabling my jquery function/button

Hey Guys, I am stuck on this problem after hours of searching and trial and error. Any help would be greatly appreciated, as I am completely out of ideas. Thank you. I have a form with a jquery button...

View Article

Problem with PHP script for uploading to DB

Title says it all. Here is the error I get: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...

View Article

Can you put an if statement within a return?

Is it possible to put an if statement within a return? Not sure if this is possible. Thank you.   Example: return ' <div id="comment"> </div> '; The if statement to go into the return: if...

View Article


Please help with echo youtube id.. simple

I used to have an acc at phpfreaks.. started coding again.  I'd appreciate some help cuz this is pissing me off.. <?php $xml=simplexml_load_file("http://X/demo/statefarm/id.xml"); $id =...

View Article

PHP Request Not Working

So I am unsure if it's my server but the same method worked on the other project I did. Can someone please help me find out why it's not working. I think I am missing something. After using...

View Article

count statement

What I'm trying to say here is, if the column STATUS is counted and in that column there are no rows that contain "ONLINE"  then I want the result to show as "There Are Currently No Users Online" else...

View Article


problem with printing only part of changing string

hey guys, i'm try to print part of the string only and i'm trying with substr and strripos and stripos. <!DOCTYPE html> <html> <body> <?php $str= '/lalala/temp/index.html'; echo...

View Article


URL Problem

Hi 1. I have a website , and at the top of the page, there is a dropdown list to let the users specify either English and Spanish as a language.   This works fine if the language is the first selection...

View Article

How to populate three text fields from one select drop-down using php

Hi Mates,   Please there is this application I was working on with a friend before we lost contact. I am required to make the following changes and as well updates on the script which I encountered...

View Article

Image may be NSFW.
Clik here to view.

Login System

I am going to be attaching the files as it would be easier.   Ignore TOP.PHP and BOTTOM.PHP in my code as they are my layouts.   Every time I try to log in through my log in system I keep getting the...

View Article

Is it your birthday?

Hi Guys.   Im just trying to find a list of people with birthdays coming up in the next 14 days from a table in my db.  I'm storing birthday as a unix timestamp.  Currently I have one birthday coming...

View Article


finding the array key containing highest value

I am NOT looking for max().   In an array, I'm trying to find the key with the highest value, not the highest value itself. For example, $arr = array(15, 10, 25, 419, 65, 25); echo max($arr); // Nope....

View Article

Image may be NSFW.
Clik here to view.

Please help with insert data

Hello, I want your help   I have this code case "addads": // $qry = "INSERT INTO 4sale_categories SET catImage1 = '".mysql_real_escape_string(trim($_GET['catImage1']))."' , catImage2 =...

View Article


Help with PHP MySQL code

I have a PHP page called insert.php that inserts records via a page with a form named index.php. It works perfectly well but I can only add one record at a time. I would like to rewrite both scripts so...

View Article

Image may be NSFW.
Clik here to view.

PHP / MySQL - Creating a Database login

Hello everyone, I am trying to create a database login but i am not having any luck. I am not sure what is wrong. I feel everything is in order but I am new and don't really know what to look for. If...

View Article


Dynamic Table Columns

Hi There,   I'm very new to PHP and i'm creating the website for my new home business. The HTML and most of the css i've managed to work myself through however, I hate the layout of my products page....

View Article

How do I convert a csv file to xml in php?

I have a csv file which contains this data:   person1,person2,person3 first,john,steve,mike last,doe,whinney,speirs   I want to create an xml file which looks like this:   <root>...

View Article

adding into database

I cannot get these field to add into my database from the text area box. I am using an image as the submit button but when I have entered everything in nothing submits into the right fields on the...

View Article
Browsing all 13200 articles
Browse latest View live