I have the following code
$message = "
Good news! The item# $item_number on which you placed a bid of \$ $bid_price is now available for purchase at your bid price.\n
The seller, $bid_user is making this offer.\n
\nItem Title : $title\n
\nAll the best,\n
$bid_user\n
$email\n
";
echo $message;
$htmlContent = $baseClass->email_fr...
how can I regenerate random decimal from -0.0010 to 0.0010 with php rand()? or any other?
...
I am trying to develop a registration page which involves three seperate information.
First Page will get contact details
Second page - working details
third page - study details.
How to keep the form data of the previous pages before posting the form?.
Plz help any help will be appreciated
...
Hello,
What is the best way to minify jQuery with other js files. My goals is one request for all my JS files. I have about 6 other js files that I would like combine with jQuery and the jQuery UI. When I leave the jQuery library and UI library out of the minification file it is fine. So I have three requests:
jQuery library
jQuery UI...
My site links to a paypal buy it now page that loads slowly. I would like to display an animated gif after the user clicks the paypal embeded link until the new paypal page loads.
Thanks in advance.
...
hi!
I've a php file which'll run a SQL script and fetch information about users.
Some user's information may span 2 or 3 pages while some might end in just 1.
I want to print the beginning of ever user's report in a new page. All these process has to be automated because there are some 400 users, and the client can't select page layou...
Hey,
I was just wondering how to decrypt/encrypt form data in cakephp by creating a behavior?
What I have so far:
$key = Configure::read('Security.cipherSeed'); Security::cipher($encrypt,$key)
debug($key);
function encrypt { var $autoEncrypt= 'true';}
function decrypt {}
Other than this I really could use some help.
...
I am trying to encode a JSP servlet into JSON. What's the equivalent in JSP to json_encode() in PHP ?
...
Dear all, I have asked a question about random generating -ve +ve decimal value here:
http://stackoverflow.com/questions/3206563/how-to-generate-random-ve-ve-decimal-with-php
But now i have another more challenging problem. May I know how can I generate random integer with -ve +value with a different set? like from -552 to 2200 as an e...
I'm a .net developer by trade but I'm looking to expand to PHP. I really like what I've seen PHP can do. However I have been somewhat spoiled with data access in .net (such as LINQ) and how easy it is to make strongly type datasets. Are there such ways to do the same (or similar ) thinks for data access in PHP? A framework I'm unawar...
I'm attempting to use multiple ANDs in this query below, and it messes up the password every time when I attempt to use my login feature. code below.
// this is my problem, right here
$result = mysql_query("SELECT username, password, FirstName FROM members
WHERE username='$myusername'
...
I want a random number generator with non-uniform distribution, ie:
// prints 0 with 0.1 probability, and 1 with 0.9 probability
echo probRandom(array(10, 90));
This is what I have right now:
/**
* method to generated a *not uniformly* random index
*
* @param array $probs int array with weights
* @return int a random index in $p...
Hello,
Is there a way that I can check for specific errors in MySQL with PHP? For example, I want to run a query that inserts 1000 last names into a database table. I know that I can use mysql_error() to check for errors, but I want to check specifically for a "duplicate value" error. Is there anyway to do that?
Thanks!
...
I do not have access to cron jobs as I am on a shared server. I would still like to run an update task on my database at set intervals. How can I best achieve this. Obviously I could check the time in which index.php is executed and if it is on the hour I could include my update script. But then there is a risk of the script not executin...
How to hide an iframe url in HTML source code.I have two applications one applications get an url of another application into its iFrame,so that it displays in its source code.I dont want to display another application url in the source code.
...
Hi I was composing a regex for a password field of my site and had a concern:
Are there any characters I should block a user from entering? If so why?
Or is it enough just to escape dangerous characters like = and ' when processing data?
It seems good for this topic to list the php functions for escaping those, if you would.
Thanks!
...
i have a form with checkboxes like this:
<input type="checkbox" name="type[]" value="1" />Fast Food<br>
<input type="checkbox" name="type[]" value="2" />Table Service<br>
<input type="checkbox" name="type[]" value="3" />Cafeteria<br>
when i use the brackets in the name (type[]), my php works:
$type=$_POST['type'];
...
Is there a simple alternative to using json_decode function in php versions prior to 5.2? I am feeling lazy at this time of night and can't be bothered to update php yet.
Cheers.
...
So, I have set up the PEAR Mail_queue package on my server, and I have it running fine, and sending emails out. I have it set to run by a cron-job every 15 minutes.
Everything works fine, except the problem is that I need to send emails in Chinese, and when I send them using the Mail_queue package, I only get gibberish. I'm assuming that...
<?
$img_w = 800;
$img_h = 600;
$img = imagecreate($img_w, $img_h);
$color = imagecolorallocate($img, 230, 230, 230);
$imgname = "gd_img.png";
for($n=0; $n < $img_w; $n++)
{
plot($n , $img_h/2, imagecolorallocate($img, 200, 0, 0));
plot($n+4 , $img_h/2 + 10, imagecolorallocate($img, 0, 200, 0)...