I have a function that I call with ?clear-cart appended to the end of my page; as you can probably guess, this function clears the user's cart.
I call it like this
<a href="?clear-cart">Clear Cart</a>
Which works great (in that it loads the same page, but now the cart is cleared), except that the URL in the address bar now reads
htt...
I want to validate my html form using both java script and php so that
If some one disable java script then php validation works
can any one tell me that how can I do this
...
I have a text file with spam words. I want to have an array filled with those words.
I've tried doing:
$fp = @fopen("../files/spam.txt",'rb');
$words = fgetcsv($fp,100,"\n");
but it doesn't work (words only has the first letter of the txt file in it first cell).
do you how to do this?
EDIT:
the .txt file looks like this:
yahoo
goog...
Ckeck out http://www.blocket.se/goteborg?ca=15
Look at the first ad.
Copy the headline, and paste it into google, and also write 'blocket' after the headline in google, now search.
You will see it finds the ad right away.
How come?
Does googles crawlers really update their index that fast?
Or is it just because you entered that sea...
I'm using phpMyFaq. I've changed coding to UTF-8, but I have trouble with exporting page to pdf (polish chars look like this: http://i50.tinypic.com/2cfaate.jpg ). What is wrong with coding?
...
I can't seem to get gettext working, here.
I'm using MAMP Pro and phpinfo(); says that gettext is enabled.
I followed this tutorial: http://zez.org/article/articleview/42/1/
I have my strings declared in my code like this: _('test string');
Then I ran xgettest -L PHP test.php, which generated my messages.po file.
I opened this file i...
Hello,
I am not much into linux, so can any body please guide me how can I check whether the apache is installed with php and mysql on ubuntu server through ssh. Also if installed in which directory.
And if in case some other package is installed like lighttpd.
Thank You.
...
Here in the tutorial on PHP I read:
If your server supports PHP you don't
need to do anything.
Just create some .php files in your
web directory, and the server will
parse them for you. Because it is
free, most web hosts offer PHP
support.
However, if your server does not
support PHP, you must install PHP.
Fi...
I get this error message, what does it mean and how to fix it?
Warning: oci_parse() expects parameter 1 to be resource, null given in /user_auth_fns.php on line 3
$conn = db_connect();
$result = oci_parse($conn, "select * from user where username='$username' and passwd = sha1('$password')");
if (!$result){
$err = oci_error();
...
There's a comment form where I'd want people to be able to write in foreign languages too.
But, for example, my spam-filtering mechanism would block something naiive as the word "été" simply because it has no vowels in it (english vowels that is).
My question is, when using regex for detecting vowels like:
$pattern = '/[aeiou]/';
I c...
So I am trying to execute some script from my php code. That lives in page blah.php
<?php
// ....
// just basic web site that allows upload of file...
?>
Inside I use system call
if (system("blah.pl arg1") != 0)
{
print "error\n";
}
else
{
print "working on it..you will receive e-mail at completion\n";
}
Works great...
I get the below error message. What other compression function(other than SHA1) should use for oracle?
Warning: oci_execute() [function.oci-execute]: ORA-00904: "SHA1": invalid identifier in /user_auth_fns.php on line 2
$result = oci_parse($conn, "select * from user where username='$username' and passwd = sha1('$password')");
$r = oc...
Could I merge two catches in PHP?
try {
// some code
}
catch (App_Exception $e) {
// do sth.
}
catch (Exception $e) {
// do the same exception code again
}
...
Hey,
I have the following issue;
Here is my string I'm trying to remove javascript:l(" from the string below:
javascript:l("Bayou-La-Batre");
My code is;
$q_string = str_replace('javascript:l(" ','',$row['1']);
But it's failing.
This is quicker than a regex replace and quicker.
Any ideas?
...
Hi,
I have my website in PHP hosted with profusehost.net. The problem is that the send_email functionality works correctly when i host it locally on my apache server with mercury mail. But now when i have hosted my pages on profusehost, the mail doesn't go with the send_email. Is there some settings which needs to be done with the hosti...
Hi, I have a forum the user fills out with 2 separate radio button categories they can fill out.
Permissions: private <input type="radio" name="permissions" value="private" /> public <input type="radio" name="permissions" value="public"/><br />
Category: default <input type="radio" name="cat" value"default" /> sport <input type="radio...
Hi guys!
I have a MySQL database with the following columns:
id company rating_score rating_place
I have companies and rating scores for each company. So, my db looks like:
id company rating_score rating_place
75 Intel 356.23
34 Sun 287.49
etc.
How can I assign the p...
Is it possible to use CURL and Paypal's Developer Sandbox? When I try this code it says in print_r($lines); that I need to login to the Sandbox, how can I make it send my browser cookie?
This code is from http://leepeng.blogspot.com/2006/04/standard-paypal-php-integration.html
$orderno = $_SESSION["ss_last_orderno"];
$ppAcc ...
I want to prevent this kind of typing:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbnonsense
for that I want to check that a certain letter gets repeated more than 9 times:
preg_match('/.{9,}/',$key)
but this would suit any word that has more than 9 letters in it, such as: supercalifregilisticexpealidocious
How do I do this?
...
Hi, i have mathematical problem which I'm unable to convert to PHP or explain differently. Can somebody send my in the right direction?
I have two number which are in order (sequence). #1 and #2. I want to somehow compare those two numbers and get a positive number lower than 100 as the result of the comparison. The higher the values, ...