function get_total_adults()
{
$sql = "SELECT SUM(number_adults_attending) as number_of_adults FROM is_nfo_rsvp";
$result = mysql_query($sql) or die(mysql_error());
$array = mysql_fetch_assoc($result);
return $array['number_of_adults'];
}
I know there is a way to write this with less code. I'm just looking for the b...
Hi
Ok this is a little complex. I am creating a plugin, and want to find the category ID from the Post page.
That's the easy part.
What makes it complex is I am doing it within an ob_start (started in a 'template_redirect' action) as I want to edit the full page before it is returned to the browser. Again that is easy enough from the ...
I found this line of code in the Virtuemart plugin for Joomla on line 2136 in administrator/components/com_virtuemart/classes/ps_product.php
eval ("\$text_including_tax = \"$text_including_tax\";");
...
hi friends
I want to learn php from basic and want to implement php in c++ so will you tell me how to learn php ,is there any good site so that i can implement with c++ programming in UNIX environment.
Thanx
...
What is the correct way to log out of HTTP authentication protected folder?
There are workarounds that can achieve this, but they are potentially dangerous because they can be buggy or don't work in certain situations / browsers. That is why I am looking for correct and clean solution.
...
I have a place holder image saying something like:
Your rating is:
[rating here]
My PHP code is supposed to dynamically insert the rating number where there is a blank space left out for it on the placeholder image. How can I do that?
...
Hello,
I am not completely sure that this is possible from within PHP or even the HTTP protocol in depth. Is it possible to receive PHP script to run when it is requested but then the script drops the connection? Without replying?
Hopefully my question makes sense.
(I am using Apache)
...
Greetings,
Is there any script that keep track users referral and set cookie on users referred so whenever they leave site and come back, it still will be count as referred by person..
thanks.
...
I have a table of datas encoded in latin5 charset and all the columns in the table are also latin5. From mysql console when I enter "SET NAMES 'latin5'" and query the table results are ok . When I try to delete or insert/update all the new data's encodings are perfect. But when I try to insert Iso-8859 data (also verify this with mb_dete...
Hello,
I'm developing a PHP application and I'm wondering about the best way to include multi-language support for users in other countries.
I'm proficient with PHP but have never developed anything with support for other languages.
I was thinking of putting the language into a PHP file with constants, example:
en.php could contain:
...
I need help i want to code a program that search for a word inside the source code.
Here a Example in Python:
import urllib2, re
site = "http://stackoverflow.com/"
tosearch = "Questions"
source = urllib2.urlopen(site).read()
if re.search(tosearch,source):
print "Found The Word", tosearch
...
Hi I have read many forums and websites that tell you how to upload an image to a server and I have managed to get this working, I can upload a file to a my server but storing the file name does work on the following example I found and I also need to create a form that allows more data to be entered to the database. I am stuck with this...
My application uses some session variables that are timing out even though I thought they would not because I've got the following setting in php.ini:
session.cookie_lifetime = 0
The other session settings in php.ini are pretty much set as their defaults. How do I make sure the session variables stay around until the browser window clo...
I have a process that will need to generate a lot of static html from a set of data. The html is relatively complex and I want the maintenance to be fairly simple so I don't want to embed much if any html in program code. At my company the blessed tool set is .net or php. My initial thought was to embed the asp.net compiler into the ...
Here is the scenario: I have two asp pages. a.aspx is layout and b.aspx is content. I want to display the contents of b.aspx inside a <div> on a.aspx. I know with PHP you can do it like so:
//a.php
<html>
<head>
<title>test</title>
</head>
<body>
<?PHP
include "b.php";
?>
</body>
</html>
//b.ph...
I'm working on an application that allows users to add their own RSS feeds to a simple reader of sorts. Currently, I'm using xml_domit_rss as the parser but I'm unsure if it's actually validating the URL before parsing. From what I can gather online, it looks as if validating is separate from the parse, either by using a service (feedval...
I ran a pen-testing app and it found a ton of XSS errors, specfically, I'm guilty of echo'ing unverified data back to the browser through the querystring.
Specifically, running this puts javascript into my page.
http://www.mywebsite.com/search.php?q=%00'" [ScRiPt]%20%0a%0d>alert(426177032569)%3B[/ScRiPt].
Thankfully, no where do I let ...
How do you protect your website from Local File Inclusion & SQL Injection (PHP)?
...
How to increase the performance for mysql database because I have my website hosted in shared server and they have suspended my account because of "too many queries"
the stuff asked "index" or "cache" or trim my database
I don't know what does "index" and cache mean and how to do it on php
thanks
...
hi, im using this php file as a header in my site. my problem is that i have included an image but it is does not displayed what is the problem??
this is my code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<h2><center><img src="../../../../Users/se...