Hi,
How do i call a function of a child class from parent class?
Consider this:
class whale
{
function __construct()
{
// some code here
}
function myfunc()
{
// how do i call the "test" function of fish class here??
}
}
class fish extends whale
{
function __construct()
{
parent::construct();
}
function...
I'm having two arrays in PHP as follows:
Array1 ( [1] => Array ( [0] => 16 )
[2] => Array ( [0] => 17 [1] => 29 )
[3] => Array ( [0] => 30 [1] => 31 )
) Total Element Count: 5
Array2 ( [1] => Array ( [0] => 21 )
[2] => Array ( [0] => 22 )
[3] => Array ( [0] => 23 )
[4] =>...
Is it possible to use Google's mail server for testing purpose,and replace the address of mail server when my own server is ready?
...
Hi,
It has been long time since we have been validating our forms using javascript. I am sure this must be the case with most other developers.
Question:
What if the user (or probably a bad guy) disables javascript?
You are lost !!
Is javascript validation worth of it?
Should we ever use it now?
Are there any solutions to this?
Cor...
My boss has asked me to write a CMS for a web-application. A place from where the user can customize all the necessary details, upload images etc. I know PHP but not JQuery. So things became difficult for me. I am proficient in .NET Windows applications, but my boss says it;s an end to Windows-based apps.
He is right I know, but I want...
Hi,
In PHP, is there any way to make class method automatically call some other specified method before the current one? (I'm basically looking to simulate before_filter from Ruby on Rails.
For example, calling function b directly but getting the output 'hello you'.
function a()
{
echo 'hello';
}
function b()
{
echo 'you';
}
Any a...
I have this web page where users can add smilies to their comments. And I want to limit the number of smilies per comment. The "system" works but I have some problems with the regex part.
I have my smilies defined in a config file like so:
$config['Smilies'] = Array (
// irrelevant stuff
'smilies' => Array (
':)' => 'smile....
I found some but still want to know more about them. Any of you using a very good (commercial will do) PHP Job Board Script.
...
adidas.com so cool !!!!!!!!!!
why not with jQuery, CSS & HTML?
How div with different height & width together fill up div container when height & width are get random from database?
Someones help me?
...
I have got some library files in PHP. i want to use them in asp.net. please give me some idea that how to use it or how to convert it to be used in asp.net (vb.net). actually i want to connect with a xml based web service (HostelsClub) but they just have API in PHP not in asp.net. so what to do.
...
i am trying to check if user uploaded his or her avatar image and i use file_exist() php function to check if the user avatar image exist or not
will this cause any server load problem with massive traffic websites ?
thanks
...
Is there any way to include the user agent string along with the request send by PHP Simple HTML DOM Parser?
...
Hi All,
I'm fairly new to iMagick and have only found very limited documentation on the PHP library. I'm happily resizing images and writing them back to the hard drive, but I'm failing completely to compress the images using JPG for instance.
This is the code I'm using so far
function scale_image($size = 200,$extension)
{
if(!file_...
I am calling a .php file in this code. In the file "fetchvalues.php", I am fetching results from the database and want to return the column values back to the calling JQuery function and display them on HTML controls of my page.
How to do so?
$(document).ready(function() {
$("#Edit").click(function() {
$.get('fetchvalues.ph...
I want to show user's mini-website on the server by creating dynamic subdomains.
The re-write rule is written as below:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourwebsite.com
RewriteCond %{HTTP_HOST} ([^.]+)\.yourwebsite.com
RewriteRule ^(.*)$ /path_to_your_site/public_html/app/test/home.php?url=%1
In the home.php page the ...
How can I see the SQL statements which go to the database when using PDO?
...
I'm working on what aims to be a secure method of user registration and authentication using php and javascript but not ssl/tls.
I realise this may well be considered an impossible task that's been tried 1000 times before but I'm going to give it a go anyway. Every example I see online that claims to do it seems to have some huge fatal ...
I've inherited a bad sitation where at our network we have many (read: many) hosted sites doing this:
include "http://www.example.com/news.php";
Yes, I know that this is bad, insecure, etc, and that it should be echo file_get_contents(...); or something like that (the output of "news.php" is just HTML), but unfortunately this is what t...
Hi,
I have a windows shared hosting account with Godaddy.com with PHP5 that does not allow cron or scheduled job.
I am developing a website in PHP5 with CakePHP and I need to run a cron job to send emails.
What will be the best way to do it?
Thanks for your answers in advance. :)
...
Hello everybody,
I have created a class file database.php which handles all the sql queries and connecting to database. I store username and password for the database in a variable (which is easily seen if one gains access to the php file).
I want to encrypt that username and password so that even after having that php file one is not ...