That should do it:
Max [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello all,
I have two arrays as follows:
$x = array(3,4,6,8);
$y = array(10,20,40,10);
I need these arrays could be merged with '0' in between.
Result expected :
$x = array(1,2,3,4,5,6,7,8);
$y =
That should do it:
?php
$x = array(3,4,6,8);
$y = array(10,20,40,10);
$tmp = $x;
rsort($tmp);
$n = $tmp[0];
$newArr = array();
$newArr = array_fill(0, $n-1, 0);
for($i=0;$icount($x);$i++) {
$newArr[$x[$i]-1] = $y[$i];
}
print_r($newArr);
?
Max [EMAIL PROTECTED] wrote in message
news:[EMAIL
ok thanks, i have written a script with javascript and i think it's running
good !
Thanks
- Original Message -
From: Daniel Clark [EMAIL PROTECTED]
To: Php List [EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 7:15 PM
Subject: Re: [PHP] numeric characters
Or you can us client side
Chris Shiflett wrote:
It loses all new data:
input type=hidden name=post
value=?php echo htmlspecialchars(serialize($_POST)); ? /
input type=text name=this_will_be_lost /
Because of this:
$_POST = unserialize(stripslashes($_POST['post']));
I think array_merge will fix this:
$_POST =
Hi, I'm currently working on a basic website creation script where I
want an index file created automaticaly within each new folder created.
My attempts at using copy() were foiled by safe-mode restrictions on my
account but after some research, I discovered this could be circumvented
with the
Another thing that you can do is cast the variable to integer
$int = (int) $_POST['data'];
Dominique Anokre [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Is there a way with php to force the user to put only numeric character in a
text field ?
thanks
--
PHP General Mailing List
Howdy --
SQLite supported by a direct call the sqlite library?
As apposed to calling the executable?
Could I use ini_set(include_path=) to tall PHP where the SQLite lib is
located?
TIA,
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 3 Mar 2004 12:30:59 - Issue 2624
Topics (messages 179320 through 179336):
Re: resubmitting $POST data to another script
179320 by: Chris Shiflett
179321 by: Marek Kilimajer
179322 by: Chris Shiflett
179323 by: Leif Gregory
179324
Hi all,
Just a quick question - but does anyone know where I could find an
example of a POST form header? As in all of the raw HTTP headers that
are sent from the browser to the server when it submits a form via
POST? If it's possible to extract this information via a PHP function
then I'll be
Chris,
Thank you for your insight.
Now that I've become aware of safe mode, it appears to substantially
restrict many PHP file functions. What's more worrisome though is the
disclaimer posted at the top of the PHP safe mode documentation: This is a
still probably incomplete and possibly incorrect
hi all!!
can anybody explain me please how i have to use this function because there
is no explaination in the german manual
many thanks
markus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2004-03-03 at 08:22, Richard Davey wrote:
Hi all,
Just a quick question - but does anyone know where I could find an
example of a POST form header? As in all of the raw HTTP headers that
are sent from the browser to the server when it submits a form via
POST? If it's possible to
On Wed, Mar 03, 2004 at 08:39:06AM -0500, Chris wrote:
One final comment. It seems there was some motivation, by the PHP creators,
to institute safe mode as a fix to potential security abuses. If that was
the case, why weren't the underlying problems be removed or remedied as
opposed to
Hi there,
I´ve got a login form, that calls a script, to check if
the user/pass match. If yes, the script do a header(Location :
index.php). In Explorer works but not in Mozilla nor Netscape.
Anyone knows something about that
Thanks
Daniel Pérez.- (dpcma at mail dot com)
Try an absolute url.
Daniel Perez [EMAIL PROTECTED] 3/3/2004 8:55:06 AM
Hi there,
I´ve got a login form, that calls a script, to check if
the user/pass match. If yes, the script do a header(Location :
index.php). In Explorer works but not in Mozilla nor Netscape.
Anyone knows something about
Raisinlove wrote:
Hi, I'm currently working on a basic website creation script where I
want an index file created automaticaly within each new folder created.
My attempts at using copy() were foiled by safe-mode restrictions on my
account but after some research, I discovered this could be
Hi All,
I am having trouble with a nested loop and I can't seem to get it figured
out.
I keep getting an error that states, Invalid argument on line 20.
Here is the code;
Sessions capture question answers that are multiple answers for each
question.
$answers =
probably, some of those $_SESSION['question#'] are unset, or arent arrays..
try:
foreach ($answers as $questions) {
$question .= __;
if (!is_array($questions))
continue;
foreach ($questions as $subquestion)
$question .= $subquestion.--;
}
}
$insert_query = INSERT INTO SurveyTable
Well that fixed the error from coming up, but now the values in the db are
empty. I don't even get Array.
alex hogan
-Original Message-
From: Andre Cerqueira [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 9:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Loop Oops
I'm building a download-manager script (like wget), in PHP. Does any of
you know how I can update a line in the console? I've tried to echo
chr(7) which is the backspace character, but it won't work. This kind of
thing is seen in tons of console applications. Like some please wait
thing that
--- Richard Davey [EMAIL PROTECTED] wrote:
Just a quick question - but does anyone know where I could find an
example of a POST form header? As in all of the raw HTTP headers that
are sent from the browser to the server when it submits a form via
POST?
This function sends a POST manually, so
I'm not sure of how you could do this, but one other thing you could do,
is like I've seen certain console FTP apps do, is just do a division of
the total size by whats downloaded, and have like 100 pound signs that
are gradually filled in as it downloads.
On Wed, 2004-03-03 at 10:53, Simon
Found it.
You were right, it was $question instead of $questions.
Many thanks.
alex
-Original Message-
From: Andre Cerqueira [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 03, 2004 9:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Loop Oops
probably, some of
Yes, that's one way. It's currently in development for Win32, but it
would be nice if it works on *nix later on aswell. Got a tip from a user
in a chatroom to use Ncurses for it, but then I can't use it on win32.
Just to correct myself; it's chr(8) and not 7.
//Simon
Adam Voigt wrote:
I'm
On Wed, 3 Mar 2004, joel boonstra wrote:
On Wed, Mar 03, 2004 at 08:39:06AM -0500, Chris wrote:
One final comment. It seems there was some motivation, by the PHP creators,
to institute safe mode as a fix to potential security abuses. If that was
the case, why weren't the underlying
Well I bet it would work on Win32, it just depends on how much CYGWIN
your willing to include with your program. I think all you would need is
the basic CYGWIN DLL(s) and a terminal like bash (plus ncurses
obviously).
On Wed, 2004-03-03 at 11:07, Simon Fredriksson wrote:
Yes, that's one way.
I found the answer. If safe-mode prevents you from copying files to a
newly script-generated directory, simply use the following:
ftp_put($conn_id, $newdirectorypath,$sourcefilepath, FTP_ASCII)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I'm Adrian and I have the following problem:
I have to encrypt a text file. For that I use a PGP DOS version (PGP 2.6 ui -
Unofficial International, because I'm outside of the US).
I installed the PGP and it is working fine when starting it from a Dos command line:
c:\PGP -e test_1.txt
Joel Boonstra wrote:
This tread inerest me because I faced with a situation, where I have to
work around don't having a database (out of my control).
What I want to do is use Pear + sqlite.so out of home directory of the
home dir.(typical L.A.P vhost)?
I is modifying safe_mode relative
TIA,
David
Please read for content... and excuse the crapping spelling
DJJ
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How can I test to see if and what portions of Pear are installed on a
vhosted website?
TX,
david
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
DAvid Jackson mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 11:20 AM said:
TIA,
David
Please read for content... and excuse the crapping spelling
DJJ
??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Chris W. Parker wrote:
DAvid Jackson mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 11:20 AM said:
TIA,
David
Please read for content... and excuse the crapping spelling
DJJ
??
Chris --
See reply to this thread right before this, I fat fingered it :)
And also the
just checking to see if i got on the list right...you can ignore
At least on Windows you can send chr(13), and then rebuild the entire
line.
- Frank
Well I bet it would work on Win32, it just depends on how much CYGWIN
your willing to include with your program. I think all you would need
is
the basic CYGWIN DLL(s) and a terminal like bash (plus ncurses
Does anyone know of a way to jump from one php script to
another without going through the client browser? The closest I have
been able to come to doing that is to use nested frames where the
parent frame can call multiple php scripts, one for each child frame.
Jim
--
Jim Feldman
14 Linda Lane
[snip]
Does anyone know of a way to jump from one php script to
another without going through the client browser? The closest I have
been able to come to doing that is to use nested frames where the
parent frame can call multiple php scripts, one for each child frame.
[/snip]
You mean
On Wed, 2004-03-03 at 14:49, Jim Sara Feldman wrote:
Does anyone know of a way to jump from one php script to
another without going through the client browser? The closest I have
been able to come to doing that is to use nested frames where the
parent frame can call multiple php
On Wed, 3 Mar 2004, Brian V Bonini wrote:
On Wed, 2004-03-03 at 14:49, Jim Sara Feldman wrote:
Does anyone know of a way to jump from one php script to
another without going through the client browser? The closest I have
been able to come to doing that is to use nested frames where
David Jackson wrote:
How can I test to see if and what portions of Pear are installed on a
vhosted website?
TX,
david
I'm not sure how to tell what portions are installed, exactly, but you
can test to see whether PEAR itself is installed simply by using
require 'PEAR.php';
If it complains,
Thank you Chris.
I have selected Disable cookie option in the
safari
browser setting on my MAC. Before selecting this
option, my website was working fine but after
disabling the cookie option, i am not able to
log-in
to my website.
There are at least two options:
1. Include the
--- Hardik Doshi [EMAIL PROTECTED] wrote:
1. Include the session identifier in all your URLs
manually.
I did this and it works fine. Now by doing this i have
a question pop up in my mind is about Security. What
security measures should i take when i am passing the
session id value on
On Wed, 2004-03-03 at 15:21, Lucas Gonze wrote:
On Wed, 3 Mar 2004, Brian V Bonini wrote:
On Wed, 2004-03-03 at 14:49, Jim Sara Feldman wrote:
Does anyone know of a way to jump from one php script to
another without going through the client browser? The closest I have
been able to
Leif Gregory wrote:
Hello Charlie,
Tuesday, March 2, 2004, 1:54:43 PM, you wrote:
CFI I'm creating a form with 170 fields, and I'd like to create an
CFI intermediary page so the user can review their info before
CFI submitting it again to the emailing script.
Just a thought. I'm guessing you are
--- Charlie Fiskeaux II [EMAIL PROTECTED] wrote:
I think the hidden fields idea is the best one; I finally found a
solution that uses each() and list() to travel the $_POST array,
and I think it will work nicely.
You might strongly consider using foreach() instead for reasons of
performance
On Wed, 2004-03-03 at 12:21, DAvid Jackson wrote:
How can I test to see if and what portions of Pear are installed on a
vhosted website?
If you have access to the command line pear you can also check with a
simple command:
$ pear list
--
PHP General Mailing List (http://www.php.net/)
To
$comobj = new COM('MyComlib.ComLib'); // Works
$comobj-FieldValue = somedata; // Works
$myval = $comobj-Property(Record);// Kind of
Works.throws an exception if the value doesn't exist
$comobj-Property(Record) = otherdata; //
Hi.
I am creating a section of a site (events system) that will post different events in
the area. Part of the form has the date the events starts. The fields in question are:
day of month the event starts, the month the event starts, day of the month the event
ends and month event ends. the
Chris Shiflett wrote:
You might strongly consider using foreach() instead for reasons of
performance (1000% or more faster):
http://www.blueshoes.org/en/developer/php_bench/
You could simply:
foreach ($_POST as $name = $value)
{
...
}
Hope that helps.
Sure does, thanks!
--
Charlie Fiskeaux
Ben Ramsey wrote:
You can download the PEAR packages yourself, though, drop them into a
directory in your site (or outside the root of your site), and use
ini_set() to set your include_path to the directory where your PEAR
classes reside. Then you can use PEAR without having to install it.
About Phorum
http://phorum.org/
Phorum is a web based message board written in PHP. Phorum was the first
PHP based message board to use a database. Phorum is designed with
high-availability and visitor ease of use in mind. Phorum has fresh
ideas and features that do not follow the same design
Hi,
I have created a small login system for my website. However if a user logs in
incorrectly I want to display a error message currently I use the code
echo You could not be logged in! Either the username and password do not match or
you have not validated your membership! br /
Hi,
I have created a small login system for my website. However if a user logs in
incorrectly I want to display a error message currently I use the code
echo You could not be logged in! Either the username and password do not match or
you have not validated your membership! br /
Hi all,
I have a script like this:
in html
form name=form action=process.php method=post
input name=type[] type=checkbox id=type[] value=1 checked
input name=type[] type=checkbox id=type[] value=2
input name=type[] type=checkbox id=type[] value=3
input name=type[]
Hello,
// This will print first and sixth line from the text file:
$file = file(people.txt);
print $file[0]br;
print $file[6]br;
// But how to print all the lines from [0] to [6] ?
// Hope you understood my problem.
Thank you very much,
sorry for my bad english,
Lab.
--
PHP General Mailing
Labunski mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 3:31 PM said:
Hello,
// This will print first and sixth line from the text file:
$file = file(people.txt);
print $file[0]br;
print $file[6]br;
actually that will print the first and seventh line of the file...
// But
adwinwijaya wrote:
Hi all,
I have a script like this:
in html
form name=form action=process.php method=post
input name=type[] type=checkbox id=type[] value=1 checked
input name=type[] type=checkbox id=type[] value=2
input name=type[] type=checkbox id=type[] value=3
foreach($file as $value ){
print $valuebr;
}
// This will print first and sixth line from the text file:
$file = file(people.txt);
print $file[0]br;
print $file[6]br;
// But how to print all the lines from [0] to [6] ?
// Hope you understood my problem.
--
PHP General Mailing List
Thanks! It was very useful!
Lab.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Your script is working perfectly, thanks for teaching me!
Lab.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2004-03-03 at 18:30, Labunski wrote:
Hello,
// This will print first and sixth line from the text file:
$file = file(people.txt);
print $file[0]br;
print $file[6]br;
// But how to print all the lines from [0] to [6] ?
// Hope you understood my problem.
for($i=0; $i 6;
hi
i have some 500-1000 word essays stored as data type 'text' in a mysql database. i'm
using the following code to generate an ms word-compatible rtf document off the
database
---snip---
//generate the headers to help a browser choose the correct application
header(
Hi,
Thursday, March 4, 2004, 9:08:19 AM, you wrote:
mo Hi,
mo I have created a small login system for my website. However
mo if a user logs in incorrectly I want to display a error message
mo currently I use the code
mo echo You could not be logged in! Either the username and
mo password
hi again,
i forgot adding the attributes, sorry :)
here it is...
I need manipulate the nodes (add and remove) .
example
I need add more one node
interface name=dmz type=ethernet device=eth3 ip=xxx
subnet=24/
?php
// create a new node
$newInterfaceNode =
I know that others have already helped you learn out to print out an
array, but you can also use print_r($array); to print out the array.
It's not useful for the end-user of your application, but it can help
you out as you're programming.
--
Regards,
Ben Ramsey
http://benramsey.com
Hi,
I have a page that checks to see if a session exists and if so does a server side
redirect - i tired using header(Location: membersArea.php); but I got an error about
headers already sent, guess this is because I have already output html before this php
command. So I tried include
On 3/4/2004 1:32:42 AM, Ben Ramsey ([EMAIL PROTECTED]) wrote:
I know that others have already helped you learn out to print out an
array, but you can also use print_r($array); to print out the array.
It's not useful for the end-user of your application, but it can help
you out as you're
matthew oatham mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 4:25 PM said:
is there a more elegant way to deal with my
situation? Is this method supported by all browsers etc..
1. don't output anything before a redirect. i figure, if a redirect is
going to happen there's really no
guess this is because I have already output html before this php command
Exactly right. Why don't you use the header() function at the top of
the page before sending any other headers? It will definitely work that
way. And if the problem is because you're doing some evaluation down in
your
Unfortunately I include the session_start(); method in the file header.php
(because I am checking for a value here to determine whether to show a
logout button or not) therefore I cant do the
?
if(session_is_registered('userId')) {
header(Location: membersArea.php);
} else {
I have a site with two limitations, neither of which can be changed:
1. The http and https servers are on different domains.
2. There are lots of non-PHP pages so session management requires
cookies.
Can anyone think of a way to kill the sessions on a single page? When
the transaction is
matthew oatham mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 5:05 PM said:
Unfortunately I include the session_start(); method in the file
header.php (because I am checking for a value here to determine
whether to show a logout button or not) therefore I cant do the
[snip]
read
but what if I wanted the variable $error to be a message. I want to set a
variable called $error to something like invalided password then display
this on the login page.
Cheers
Matt
- Original Message -
From: Tom Rogers [EMAIL PROTECTED]
To: matthew oatham [EMAIL PROTECTED]
Cc: [EMAIL
Hello adwinwijaya,
Wednesday, March 3, 2004, 11:27:44 PM, you wrote:
a as you can see the type should be an array ... but it just displaying
a Array
a if I remove strip_tags from my script it will work perfectly (it will
a display the checkbox array) ...
a can someone explain to me why
I looked the the configure --help but didn't see sqlite?
Or did I just miss it? How can I build the module for sqlite.
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello Brian,
Thursday, March 4, 2004, 1:08:47 AM, you wrote:
BD I have a site with two limitations, neither of which can be changed:
BD 1. The http and https servers are on different domains.
BD 2. There are lots of non-PHP pages so session management requires
BD cookies.
BD Can anyone think
this case using javascript
with the function window.open()
e.g
the file index.php will popup teste.php while the index.php load
inde.php
..
body onload=window.open('teste.php')
.
rgds
http://amadarum.e-tics.net/blogger
- Original Message -
From: Andre [EMAIL PROTECTED]
To:
On Thursday 04 March 2004 06:00, Andy B wrote:
[snip]
How would i start going about doing this?? I considered using the day of
the year but dont know if this would work that well...
Start by looking at Date and Time functions, you'll find that strtotime()
would be particularly useful.
--
Hi,
Thursday, March 4, 2004, 11:08:06 AM, you wrote:
mo but what if I wanted the variable $error to be a message. I want to set a
mo variable called $error to something like invalided password then display
mo this on the login page.
mo Cheers
mo Matt
mo - Original Message -
mo From:
Thanks for your help.
Lucian Cozma [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]...
That should do it:
?php
$x = array(3,4,6,8);
$y = array(10,20,40,10);
$tmp = $x;
rsort($tmp);
$n = $tmp[0];
$newArr = array();
$newArr = array_fill(0, $n-1, 0);
Hi, i have the followin problem, i have a site that use sessions,
sometimes when i want to write on the session i get the followin error:
Warning: Unknown(): The session id contains invalid characters, valid
characters are only a-z, A-Z and 0-9 in Unknown on line 0
Warning: Unknown(): Failed to
When i try to send a mail i receive the followin error
Warning: mail() [function.mail]: SMTP server response: 503 Comando o
secuencia de comandos inesperados in
E:\wwwroot\helpdesk_imagine\classes\helpdesk.class.php on line 1054
But the mail is sent, it occurs sometimes not always.
Thanks,
Hello,
On 03/03/2004 06:03 PM, Carlos Castillo wrote:
When i try to send a mail i receive the followin error
Warning: mail() [function.mail]: SMTP server response: 503 Comando o
secuencia de comandos inesperados in
E:\wwwroot\helpdesk_imagine\classes\helpdesk.class.php on line 1054
But the mail
http://us4.php.net/switch
if/else/else/else/else is ridiculously hard to read. for more then
if/elseif/else use switch.
~pj
Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
Does anyone know of a way to jump from one php script to
another without going through the
I have a couple of questions regarding sessions and cookies:
1) Is there a way to append information to a cookie? I have read that it
is, but I have also read many problems. Is there any particular way to do
this? I ask this because cookies are being generated by two different types
of
Hi everyone,
I would like to use the function 'image' in php~I know that I have to
install GD before using itI've downloaded the zlib and lpng files...but
how can I install them??
and may it ask for a simple testing function to test if the GD works?
Thanks,
Kenneth
--
PHP General Mailing
To all,
I have a problem on using the function image.
I've downloaded the zlib and lpng files...but i don't know how to install
them.
Also, I've heard that for latter version PHP, there is already GD library,
what i have to do is just to uncomment the linephp_gd2.dll, i've followed
this but the
hi.
i found strtotime and it seems to work but not quite sure if i know how to use it
right...
here is my code:
?php
$time= strtotime(third saturday january 2005);
echo date(M/D/YY, $time);
?
i wanted it to take the third saturday of next year (2005) and say do this: saturday
january 24?? 2005
hi.
i found strtotime and it seems to work but not quite sure if
i know how to use it right...
here is my code:
?php
$time= strtotime(third saturday january 2005);
echo date(M/D/YY, $time);
?
i wanted it to take the third saturday of next year (2005)
and say do this: saturday
You'd want something more like this for the format:
echo date(l F j Y, $time);
but for me, this caused the following output
Saturday June 27 2009
doesn't seem right somehow :/
i know i wonder if i have the strtotime(third saturday january 2005);
written all wrong or something.
makes me
Hi,
Squirrelmail 1.4.2 serversidefilters plugin version 1.32, apache 1.3.26 and
php 4.3.4, qmail/vpopmail/courier-imap, maildrop on debian stable.
When the serversidefilters plugin goes to en/decrypt domain passwords using
mcrypt, I get this error message:
Fatal error: Call to undefined
dear all,
I have a problem on using image function. I've download the zlib and lpng
file as it was told, but i still can't use the image function.
How can I install these files into php??
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
dear all,
additional to the previous post, I was told that for later version of php,
there is already GD with it, and what should i do is just uncomment the
php_gd2.dll line...i've tried this also, but it still doesn't work, how can
i solve this and use the function imagethanks
--
PHP
On Thursday 04 March 2004 12:52, Andy B wrote:
You'd want something more like this for the format:
echo date(l F j Y, $time);
but for me, this caused the following output
Saturday June 27 2009
doesn't seem right somehow :/
i know i wonder if i have the strtotime(third saturday january
Hi All,
Can someone tell me which is better, or if there's a reason I should use one
and not the other (since both seem to work), and if this is the
correct way to access script variables inside functions (and classes):
Example 1
$GLOBALS['db_name']=website;
function QueryDB() {
echo
hello everyone,
I've some question about using image function.
I've followed the instruction and downloaded the zlib and libjepeg-6b, but
how can i install them??
Some said that for new version of php, what i need to do is just uncommend
the ini-file, but i just find it still doesn't work.
Thanks,
96 matches
Mail list logo