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

show all tables in database

Hi All, I having trouble finding a way to show all of the tables within my database. The goal is to get the current database structure. I am working on a project for a friend and they are running the...

View Article


Passing an argument as opening and closing tag

Hey Guys.  I have a function below. When I call it I want to pass in an <response> opening tag and a </response> closing tag as one argument, instead of having 2 arguments for the closing...

View Article


Errors =_=

long story short i decided to make a php script that can identify hashes and return the type such as MD5,SHA-1,etc   i keep getting these same 2 errors PHP Warning:  fread() expects parameter 1 to be...

View Article

Why does this always give same result, even when table is empty?

I am trying to show two different options, depending on if the table is empty or not. It's a form to post images of artists. The user should be able to add images to existing artist, but if not artist...

View Article

generate a log file with site statistics

I have a PHPBB based forum where I'd like to automatically generate a log file with some site statistics. every time there is a hit on a topic page (which runs a file named viewtopic.php),   I want to...

View Article


Understanding IoC and Dependency Injection

Quick Forward: I'm writing this with the intention of getting a better understanding of dependency injection and IoC containers, but also so that afterwards I can correct the mistakes in it and use it...

View Article

reverse a string

I have a sting, containing numbers and letters,  such that:   abc  12,345 def   I want reversing only the words, so the result will look: def 12,345 abc.     I know how to reverse the all string:...

View Article

Sorting multi-dimensional array

I have a muli-dimensional array (see below).   I'm trying to use PHP to group matching events. Basically any matchname that is a duplicate (eg. Reds vs Whites) to group them together and group their...

View Article


escaping variables

hi yall how can i escape php variables inside a html attribute, being echoed with php?   like follows:   echo "<img title=' " . $ls_cb_title . " '>";

View Article


Display all databases in dropdown menu.

Hello everyone.I was trying to display all the databases available on a server in a dropdown list.But I could not get it.Here is my code. <html> <head> <title> List Databases...

View Article

array and curl issue

Hello, I'm trying to post data to some remote sites and I think I have something in the wrong order. Any help would be appreciated.   Thanks for your time. Here is how its suppose to work... gets array...

View Article

mysqli error

I am getting this 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 '' at line 1 This is the code I used: $sql...

View Article

Select where letters are not the same

Hello i need some help on how to select like this here below.   Do i need somthing like not equal or greater than ?   C. ------------------------------------ Ca Car Cars...

View Article


Instantiate a child class object as a copy of an already instantiated parent...

I was wondering if this could be done using the __clone magic method or something similar.

View Article

Need help displaying variables through functions

Hey guys. I am trying to create a method that will return the  variable and whats assigned to the vairable. Not  jsut the string.   So for example, when I call my code account() below, I want it to...

View Article


Subtract timestamp time from current time

I want to subtract database timestamp from current server time. The formatted time that is returned to me from my database is "2013-09-01 22:05:39" and I use function date("Y-m-d H:i:s"); so that my...

View Article

Issue with placing adsense ads

Hi, i have a wordpress site http://shippingandfreightresource.com.. There is an adsense ad in the body of the site (not the header or sidebar).. I would like to know how to position this ad ABOVE the...

View Article


Variable not available? Scope issue?

I didn't right this code but I can't figure out why the $db var isn't available in the DBPersister() constructor and in the functionName(). $s = new somePersister(); print_r($s->functionName(123));...

View Article

Warning: reset() expects parameter 1 to be array, null given H

**MY ERRORS:**   Warning: reset() expects parameter 1 to be array, null given in /srv/disk10/1498077/www/stats.php on line 54 Warning: Variable passed to each() is not an array or object in...

View Article

How do wysiwyg editors work?

I'm allowing my users to use a very basic wysiwyg editor to make their posts a bit more fancy; however, I would assume that this gives them the ability to put raw HTML into their posts? So how would I...

View Article
Browsing all 13200 articles
Browse latest View live


Latest Images