managed to found out the cause. it was the cookies. it got overloaded
with data and exceed the 4k limit. the cookies was storing preferences
for too many users thus it break the limit.
B.C. Lance wrote:
hi guys,
i am facing the above problem. i couldn't explain whats causing this
beh
hi guys,
i am facing the above problem. i couldn't explain whats causing this
behavior. however, those data does get posted to the server. only thing
is that the result page is not showing up but the above error page.
i have tested with 60+ post elements, but no error of such occur. any
idea w
one reason that i could think of for not including session id into URL
and using cookies would be copy & paste.
users could just copy and paste the url and send it to his/her friends.
and it could be a considerably number of people. imagine couple of
people clicking on the link. that session wi
http://www.phpedit.net
Bryan McLemore wrote:
> Hi guys, just wondering if anyone could recomend a good editor that is based on
>windows. Thanks, Bryan
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you should use mysql_num_rows() to check for records returned instead of
using mysql_query().
this is because if $query is a valid $sql statement, mysql_query() will
always return a resource link. which evaluates to true.
so this will work for you:
if (mysql_num_rows($result))
echo "record
if you can't use [] for the checkbox, the only way out is to have unique
name for each checkbox.
otherwise, php will always be returning the value of the last checked
checkbox if all checkboxes share the same name without the [].
--lance
Alex Shi wrote:
> How to ontain data from a group of ch
hm...
this should work, notice the double quotes
echo preg_replace('/(.+?)(\..+?)/e', '"\1"."1"."\2"', $fn);
Lallous wrote:
> Oh well,
>
> I could have solved it w/ too many other methods, but how can I escape the
> \{occurence} as in my case?
>
--
PHP General Mailing List (http://www.php.
and if you are gonna append '1' for all extension,
try this:
echo preg_replace('/(\..+?)/', '1$1', $fn);
Lallous wrote:
> $fn = 'test.gif';
>
> echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn);
>
> ?>
>
> This script will output 'testa.gif'
>
> now how can i make it produce 'test1.gif' ?
>
probably this will be faster?
$fn = str_replace(".gif", "1.gif", $fn);
Lallous wrote:
> $fn = 'test.gif';
>
> echo preg_replace('/(.+?)(\..+?)/', '\1a\2', $fn);
>
> ?>
>
> This script will output 'testa.gif'
>
> now how can i make it produce 'test1.gif' ?
>
> if i replace the: '\1a\2' with
try this instead:
session_start();
.
.
.
if (mysql_num_rows($_query)) {
$_rec = mysql_fetch_array($_query);
if (!isset($_SESSION["bkmks"]) ||
!in_array($_rec, $_SESSION["bkmks"]) {
$_SESSION["bkmks"][] = $_rec;
}
else {
echo "Already exist.";
}
}
to test:
echo
how about using the counter to store an id of the mirrors instead of
randomly picking one? this will provide you a sequential traverse
through all mirror sites.
if there are 10 sites, the counter will always be from 0 -> 9. this way
each mirror site will have equal share on hits. so if the cou
to store:
setcookie ("TestCookie[0]", "zero", time() + 3600);
setcookie ("TestCookie[1]", "one", time() + 3600);
setcookie ("TestCookie[2]", "two", time() + 3600);
or
setcookie ("TestCookie[one]", "1", time() + 3600);
setcookie ("TestCookie[two]", "2", time() + 3600);
setcookie ("TestCookie[thr
you might wanna use this instead:
$result = mysql;
if (mysql_num_rows($result) {
while
}
else {
echo 'no articles';
}
$result will always hold an int value if the query does not contain any
error. so doing a num_rows on it will be more accurate in telling you if
records are been
ahhh. let the parser do the check. works great if you are not comparing
with 2 variables :)
in fact, another way to avoid this kinda pitfall, switch is another
alternative. but of course, switch has its pitfall too. ;)
Matt wrote:
> if(0 == $row['gid'])
>
>
>
--
PHP General Mailing Li
from my experience, you don't really have to worry much on the space
issue. & is the delimiter to determine that the string terminates and a
new argument begins next. and very often, the browser will do an auto
conversion from space to %20 when you click on the link.
David T-G wrote:
>
> so
you could try this:
transmitting end:
$value) {
$searchArg .= "keylist[]=".htmlentities($value)."&";
}
?>
array from search argument
receiving end:
foreach($_GET["keylist"] as $key => $value) {
echo "{$value}";
}
David T-G wrote:
> Hi, all --
>
> I collect field keys in an array that
to do a comparison between two values / variables, you have to use ==
instead of =
= is an assignment while == is a comparison operator
if($row['gid'] == 0)
{
$rat = 110;
}
elseif($row['gid'] == 1)
{
$rat = 9.5;
}
else
{
$rat = 6.6;
}
--
PHP General Mailing List (http://w
you could loop through $_POST (assuming you are using a post action) to
extract the value out.
e.g.
$arr = array_keys($_POST);
for ($i = 0; $i < count($arr); $i++) {
$msg.= "{$arr[$i]}: {$_POST[$arr[$i]]}\r\n";
}
echo $msg;
b.c. lance
Jeremy Bowen wrote:
> Hey,
>
>
le. use an image as the input type. that will probably brighten
up the page.
in short, what i mean is let the user do the submit if javascript fails.
an image of brintney spear and a text on it telling the user to click on
sounds appealing to you? ;)
b.c. lance
Alberto Serra wrote:
> ðÒÉ×
hm... how about sticking couple of iframes that will load the piece of
javascript and have each of the javascript in the iframe firing at
different time? i suppose at least 1 copy of javascript will be there to
do the intended work.
Alberto Serra wrote:
> It is there already. My problem is to
you might wanna fire that javascript using onload from the body tag.
that kinda assure the page is loaded successfully before the event takes
off.
Alberto Serra wrote:
> I already have that and it works fine. The problem is when jscript is
> not working (or missing). I was trying to build up s
not from meta refresh. but javascript could do that. set a timeout that
will fire the submit event after 2 seconds. that will work.
b.c. lance
Alberto Serra wrote:
> ðÒÉ×ÅÔ!
>
> Probably a stupid question. Is there anyway to force POSTing a form from
> the refresh META?
>
&g
safe?
and not: http vs https
just my 2 cents
b.c. lance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you might wanna check if register global is turned on or off.
Naintara Jain wrote:
> One thing I forgot to mention is that the same code works perfectly on the
> web server (running on Apache and a Unix flavor).
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROT
ces are accessing two different file system spaces
>(or they should be unless you've got your server badly misconfigured) so
>the http://...register.php is going to be a different file from the
>https://...register.php. You might want to reconsider your design.
>
>..mike
it is sent via https
specified in the [form] action?
note: the registration form is served from http.
could someone enlighten me on this?
regards,
b.c. lance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
26 matches
Mail list logo