Hi - Working on my first Wordpress site so I'm sure this is a really basic question. I'm struggling to write a conditional php statement that performs a certain action when a page is a child of a parent page.
For example, rather than just specifying one page, as below, I'd like to specify all pages that have the 'About Us' page as a pa...
Lets say I have an array of javascript objects, and I am trying to pass those objects to a php page to save them into a database. I have no problems passing a variable to the php and using $_POST["entries"] on that variable but I can't figure out how to pass an entire array of objects, so I can access my objects.entryId and .mediaType va...
Hello, I'm just wondering what's more costly, something like:
echo "Hello world, my name is $name";
or
echo 'Hello world, my name is '.$name;
I know in this case it wouldn't make much difference, but maybe here it would:
for($i = 0; $i < 10000; $i++)
{
echo 'Hello world, my name is '.$name;
}
Thanks in advance!
...
I am developing an application where I have a requirement that I have to include multiple files, as follows:
File1.php will include File2.php
File2.php will include File3.php
File3.php will include File4.php
Now, what will be the best and optimized way of doing these. I tried with include() but I think its slowing down my server as ...
I have an html file where I'd like to get all the text inside these two tags:
<div class="articleTitle">
</div>
I'm not entirely sure how to do the php regex.
(I also know there are no html tags inside the div, so there's no problem about nested tags)
update: when i try the solutions given i get this: Warning: preg_match() [function...
Hi!!
I have to use php function date_parse but it is supported for 5.2.*. So is there any alternative for function date_parse for php 5.1.*. Hope to get answer........
Thanks ............
...
I am implementing a website using PHP for the front end and a Java service as the back end. The two parts are as follows:
PHP front end listens to http requests and interacts with the database.
The Java back end run continuously and responds to calls from the front end.
More specifically, the back end is a daemon that connects and ma...
I have been looking around for solutions, and tried to implement what is often suggested, but I am not managing to horizontally center a div within another div.
With my CMS I want to show up to four info blocks towards the bottom of the page. So, I am trying to put between zero and four divs within two container divs. The four divs get ...
Php can detect IP, hostname, client agent etc. Can php detect client browser monitor size/resolution?
...
I've got my php working to set a cookie storing the http_referer the visitor came from,
but how(or where) do i put this code in my Drupal theme/installation, to make it set cookie when a visitor first lands on my Drupal site?
...
Hi guys!
Im wondering if the way i use to retrieve the id of the last row inserted in a postgresql table is efficent..
It works, obviously, but referencing on the serial sequence currval value could be problematic when i have many users adding rows in the same table at the same time.
My actual way is:
$pgConnection = pg_connect('host...
in PHP Does die() gives anything in return when we use it?
...
Hi Folks,
I was wondering if would it be possible to protect the "https://www.DOMAIN.com:8443" URL from search engines listing perhaps using the htaccess to redirect the 8443 port from "DOMAIN" to elsewhere?
This is the VZPP Plesk - Login Login to Plesk. Please enter your
login information. Username. Password.
Interface Languag...
I've installed php on my xp, but failed to add an extension to mysql
Here is what I did in php.ini:
[PHP_MYSQL]
extension=php_mysql.dll
and there is such a file in ext/
but when I look into phpinfo(), only to find that mysql extension is still not added.
What have I did wrongly?
...
I have a file that opens a URL and reads it and does the parsing.
Now if that URL goes dwon and my file fails to open it then what i need is that an error mail should get generated but on terminal or konsole no error message should appear.
how can i do that?
Plz help!!
...
I want to print the input value in flex to PHP.
My Flex Code...
<mx:HTTPService id="sendReq" result="google(event)" showBusyCursor="true" method="POST" url="http://localhost/search/index.php" useProxy="false">
<mx:request xmlns="">
<keyword>
{keyword.text}
</keyword>
</mx:request>
</mx:HTTPService>
...
using php and mysql
I have two tables, a users table and a profiles table.
When a new account is created on my site the user and profile rows are created at the same time.
I want a foreign key to reference from the users table to the profiles table so that the users profile information will be stored in a seperate table.
My questi...
Intense Debate uses the following javascript code to display a comments number on my blog, which I have included in a handy little php function. By passing this php function the ID of a blog post, it creates a link to the comments section of that specific post.
function show_comments_number($id) {
$url="index.php?p=post&id=$id";
?>
<sc...
I get this error after installing mamp and setting up my site on dreamweaver. I connected to a database I created in phpMyAdmin, then i tried to create a recordSet for my application then i get this error.
While executing addDynamicSource in Recordset.htm, a JavaScript error occured.
Any idea anybody what this is and how to fix it. tha...
I have a multidimensional array in PHP like this:
$array = array(
"Part1" => array(
"Subpart1" => array(0, 1),
"Subpart2" => array(1, 0)
),
"Part2" => array(0),
"Part3" => array(0, 1, 0)
);
Now I want to store this array in a MySQL table and retrieve it exactly like this again on another PHP page.
I've...