php-general Digest 11 Dec 2005 14:32:19 -0000 Issue 3844
Topics (messages 227278 through 227304):
Transfer-Encoding: chunked problem
227278 by: kumar kumar
227285 by: M
Re: simple-ish question but something i never knew
227279 by: matt VanDeWalle
Re: href links not working in XP
227280 by: David Bevan
227281 by: Marlin Unruh
227284 by: M
Re: Accessing photos outside the web folder
227282 by: Philip Hallstrom
quickly discovered why refresh isn't nice
227283 by: matt VanDeWalle
227286 by: rqkycydlo5
Re: broken code....
227287 by: Eternity Records Webmaster
Variable $_POST vars?
227288 by: The.Rock
227289 by: Stephen Johnson
227290 by: The.Rock
227291 by: The.Rock
227292 by: The.Rock
227293 by: Stephen Johnson
227294 by: The.Rock
227295 by: Robert Cummings
227296 by: The.Rock
227297 by: The.Rock
227298 by: Robert Cummings
227299 by: Robert Cummings
227300 by: The.Rock
227301 by: The.Rock
227302 by: The.Rock
227303 by: Robert Cummings
Moving code from a specific file to a generic one
227304 by: MARG
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi
i am sending encrypted data(AES-CBC) every large
files to the php pages as streams, in php i am
decrypting the data .
The code is working fine for the filesize less than
12MB each (if 30files each of 12 Mb total = 360 Mb)
its working file .
If i am trying to upload a file greater than 15 mb the
upload is hanging at 13.43Mb
And after some time i am getting following msg
Server: Apache/2.0.53 (Win32) PHP/5.0.3
X-Powered-By: PHP/5.0.3
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
ìD0Ρ)ÝT5 ìD0Ρ)ÝT5 and junk values
If any body have idea, what's the problem pls help me
WithRegards
Kumar
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--- Begin Message ---
kumar kumar wrote:
Hi
i am sending encrypted data(AES-CBC) every large
files to the php pages as streams, in php i am
decrypting the data .
The code is working fine for the filesize less than
12MB each (if 30files each of 12 Mb total = 360 Mb)
its working file .
If i am trying to upload a file greater than 15 mb the
upload is hanging at 13.43Mb
And after some time i am getting following msg
Server: Apache/2.0.53 (Win32) PHP/5.0.3
X-Powered-By: PHP/5.0.3
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1
‚ìD0Ρ)›ÝT5 ‚ìD0Ρ)›ÝT5 and junk values
What is the maximum post size?
--- End Message ---
--- Begin Message ---
well i learned once again, or maybe it is a new commandment for me: "thou
shalt not code after midnight" lol because the blank page after the
refresh was a really stupid blunder on my part. it seems like I was
trying to use $type as a variable but it was refreshing/redirecting to
the same page..oops! it never even crossed my mind last night that "type"
could possibly be a keyword in html..i use it all the time for forms but i
never gave it a thought..after i went to bed for the night, i finally
thought "oh duh!! you probably cant use that" so i guess it was doing what
i told it, not what i wanted though :p
matt
On Sat, 10 Dec 2005, Robert Cummings wrote:
On Sat, 2005-12-10 at 02:55, Michael Hulse wrote:
On Dec 9, 2005, at 11:35 PM, Aaron Koning wrote:
Its been my experience that meta tags work better.
header("Refresh: 0; URL=https://www.theNewUrl/forward.html");
I didn't know you could do that *lol*. Either way, I think the example I
gave is better. Why stop at an intermediate page? The location header is
immediate.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Would it be possible to see your code for this? I have had similar problems
within firefox but never within IE.
Regards,
David
Marlin Unruh <[EMAIL PROTECTED]> wrote: I apologize because I posted this
question earlier under Re: [PHP] href
difference between OS's, and am still struggling with the problem. I
think I have fished all the way around the lake, with no results.
I cannot get href links to local files to work on an XP machine. The
exact script that is creating the links works perfectly on two W2K
machines. On the XP machine if I right click and select print, the given
file will load in the application as desired, but a print dialog box is
also opened. If I right click and select open nothing happens, same as
if I just left click the link. I have added an AddType in the Apache
conf file, but no change. I have looked at the IE security settings,
nothing. The file mime type is set because I can use the file explorer
and clicking on a desired file and the application will run and load the
file for editing.
--
Regards,
Marlin Unruh
Sunco Systems Inc.
(308) 326-4400
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Sure, here is the main function and the function that sends the
files/links to the browser. This works fine on two w2k machines, but not
on our XP machine. If I place the mouse pointer over the link on the web
page it shows correct in the IE status bar. Example:(
file:///c:/suncosys/act/2d/file_name.vc6 )
I have never got the links to work using Firefox. I am interested how
you made that work! I am running version 1.5 beta 1.
[snip]
/**********************************************************************
* main function
**********************************************************************/
<?php
$wd_path = $_GET['directory'];
if($wd_path == "") $wd_path = "c:/suncosys"; // default directory
if non passed
echo "<h2>".$wd_path."</h2>"; // display directory trail
query_dirs($wd_path); // this queries and displays the directories
echo "<hr>";
$file_array = query_files($wd_path); // queries the CAD files for
internal info name and desc.
asort($file_array); // sort array
reset($file_array); // reset array pointer
echo "<table cellpadding=\"2\" cellspacing=\"2\" border=\"2\">";
display_files($file_array);
echo "</table>";
?>
[/snip]
Following is the function that displays the files/links.
[snip]
/**********************************************************************
* pass an associated array of files and descriptions
**********************************************************************/
function display_files($file_array) {
// display files
while(list($files,$desc) = each($file_array)) {
$file_path = $files; // get the absolute path
$file_name = basename($file_path); // strip the file name
$file_type = strpos($file_name, ".vc6"); // test for correct file
extension
echo "<tr>"; // table row
if($file_type == True) {
echo "<td><img src=\"/icons/small/graphitelogo.gif\"
alt=\"[FILE]\">";
} else {
echo "<td><img src=\"/icons/small/unknown.gif\" alt=\"[FILE]\">";
}
echo "<a href=\"".$file_path."\">".$file_name."</a></td>";
if($file_type == True) {
echo "<td>".$desc."</td>";
}
echo "</tr>";
}
} // end of display_files function
[/snip]
David Bevan wrote:
Would it be possible to see your code for this? I have had similar
problems within firefox but never within IE.
Regards,
David
*/Marlin Unruh <[EMAIL PROTECTED]>/* wrote:
I apologize because I posted this question earlier under Re: [PHP]
href
difference between OS's, and am still struggling with the problem. I
think I have fished all the way around the lake, with no results.
I cannot get href links to local files to work on an XP machine. The
exact script that is creating the links works perfectly on two W2K
machines. On the XP machine if I right click and select print, the
given
file will load in the application as desired, but a print dialog
box is
also opened. If I right click and select open nothing happens,
same as
if I just left click the link. I have added an AddType in the Apache
conf file, but no change. I have looked at the IE security settings,
nothing. The file mime type is set because I can use the file
explorer
and clicking on a desired file and the application will run and
load the
file for editing.
--
Regards,
Marlin Unruh
Sunco Systems Inc.
(308) 326-4400
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Marlin Unruh wrote:
Sure, here is the main function and the function that sends the
files/links to the browser. This works fine on two w2k machines, but not
on our XP machine. If I place the mouse pointer over the link on the web
page it shows correct in the IE status bar. Example:(
file:///c:/suncosys/act/2d/file_name.vc6 )
Does it work if you copy&paste the link? It might be a security feature.
--- End Message ---
--- Begin Message ---
I'm writing a content management application which saves file paths in a
database and allows users to search the database for those files. Problem I'm
having is that although the PHP script that handles the database queries
works fine, when the search results get to the browser, all the paths are off
limits.
I can't just move the photos inside the web folder as we're talking tens of
thousands of images that are already organized into a folder structure that
must be maintained as is.
Is there a way to allow the web page to see these photos?
The images are stored on a Windows box and all the web server stuff is on a
G5 Macintosh running OS 10.4 3 (in case that has any bearing on the matter).
Depending on security issues you have two options.
Put a webserver on the Windows box and modify your search results to link
to the images using something like this:
<img src="http://windowsbox/getimage.php?path=/path/to/img.jpg">
Then put a "getimage.php" script on the windows box that does something
like:
<?php
readfile($_GET[path]);
?>
If you can't (or don't want to) put the windows box on the internet, then
still do the above and then also do the same on the mac. Assuming the mac
can get to the windows box. If that mac can't, then you're hosed.
good luck
-philip
--- End Message ---
--- Begin Message ---
hello,
I just found out why one reason for a meta refresh is a bad idea, it does
exactly that, it refreshes the page every 3 or 2 or 0 seconds which
basically is constant..so maybe the header idea is better in this case.
--- End Message ---
--- Begin Message ---
★☆ -・・・素敵な出会いを見つけませんか・・・- ★☆
■ 完全無料!素敵な相手をGET!
■ 男性無料会員!大幅増員致します!
↓↓【ラブ☆リング】は自由恋愛を支援するコミュニティサイトです。
http://d-ai-desire.com/web/web_h5.html
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
今回、貴方様に突然のメールをさせて頂いたのには理由があります。
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
☆現在【ラブ☆リング】は、女性の方の希望者が爆発的に急増し、
男女比率が偏り男性様が少なくなった為に、希望女性に対して満足に男性様
をご紹介する事が非常に困難になってしまいました。
☆こんな方が多いです。
*割り切ったお付き合いを考えてます!
*言葉でいえないこといっぱいしたいな(*^-^*)!
*趣味はビリヤードです!でもエッチも・・好き(*^-^*)!
*ちょっとSMにも興味があります(∇⌒*)!
*私・・・ご主人様いませんか(ToT)!
*恋人募集中です(;_;)
などの女の子が多数待っております!
☆そこで男性様の人数を調整し、希望する男女の皆様に円満な出会いをして頂
く為に、男性様の無料会員の増員に踏み切り、今回貴方様にメールをさせて
頂いた次第です。
この紹介に関する情報配信を停止したい方は
下記の配信停止希望専用のメールアドレスより空メールをお送り下さい。
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Got it fixed now... tnx...
-----Original Message-----
From: Ben Blay [mailto:[EMAIL PROTECTED]
Sent: Friday, December 09, 2005 9:46 AM
To: Mark Steudel
Cc: [email protected]
Subject: Re: [PHP] broken code....
I believe the difference between using =& and = is that the former
passes the value by reference, though I've never been clear about the
benefits of using one over the other when it comes to PEAR:DB (the
PEAR:DB documentation uses =& extensively, so presumably it is the
better method).
Ben
On 12/8/05, Mark Steudel <[EMAIL PROTECTED]> wrote:
> Good catch:
>
> So I normally do
>
> $results =& $db->query ( "SELECT * FROM table" );
>
> What is the difference between using the & and not using the &.
>
> -----Original Message-----
> From: Ben Blay [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 08, 2005 10:27 AM
> To: [email protected]
> Subject: Re: [PHP] broken code....
>
> > $results->query('select * from eternityrecords.journal');
>
> Should this not be:
> $results = $db->query('select * from eternityrecords.journal');
>
> See:
> http://pear.php.net/manual/en/package.database.db.db-result.fetchinto.php
>
> Ben
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Is there a way to do this?
$var = $_POST["$var"];
I have a form that submits data, except the name of each input field is
incrementing. So I need to increment the $_POST var. Any ideas?
I can't seem to get anything to work
Chris
--- End Message ---
--- Begin Message ---
On 12/10/05 9:06 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
> Is there a way to do this?
>
> $var = $_POST["$var"];
>
> I have a form that submits data, except the name of each input field is
> incrementing. So I need to increment the $_POST var. Any ideas?
>
> I can't seem to get anything to work
>
> Chris
What type of field are you using? In these cases I have always passed the
data in an array and passed the post into an array variable which I could
then increment.
--
Stephen Johnson
The Lone Coder
http://www.ouradoptionblog.com
*Join us on our adoption journey*
[EMAIL PROTECTED]
http://www.thelonecoder.com
*Continuing the struggle against bad code*
--
--- End Message ---
--- Begin Message ---
Here is an example of one of the fields:
<input name="item{number}" size=60 class="formdata" value="{item}">
I'm looping thru this form several times, so each time the name gets
incremented. Do you have an example of what your talking about?
"Stephen Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 12/10/05 9:06 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
>> Is there a way to do this?
>>
>> $var = $_POST["$var"];
>>
>> I have a form that submits data, except the name of each input field is
>> incrementing. So I need to increment the $_POST var. Any ideas?
>>
>> I can't seem to get anything to work
>>
>> Chris
>
>
> What type of field are you using? In these cases I have always passed the
> data in an array and passed the post into an array variable which I could
> then increment.
>
>
>
>
> --
> Stephen Johnson
> The Lone Coder
>
> http://www.ouradoptionblog.com
> *Join us on our adoption journey*
>
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
--- End Message ---
--- Begin Message ---
Here is an example of one of the fields:
<input name="item{number}" size=60 class="formdata" value="{item}">
I'm looping thru this form several times, so each time the name gets
incremented. Do you have an example of what your talking about?
"Stephen Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 12/10/05 9:06 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
>> Is there a way to do this?
>>
>> $var = $_POST["$var"];
>>
>> I have a form that submits data, except the name of each input field is
>> incrementing. So I need to increment the $_POST var. Any ideas?
>>
>> I can't seem to get anything to work
>>
>> Chris
>
>
> What type of field are you using? In these cases I have always passed the
> data in an array and passed the post into an array variable which I could
> then increment.
>
>
>
>
> --
> Stephen Johnson
> The Lone Coder
>
> http://www.ouradoptionblog.com
> *Join us on our adoption journey*
>
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
--- End Message ---
--- Begin Message ---
Here is an example of one of the fields:
<input name="item{number}" size=60 class="formdata" value="{item}">
I'm looping thru this form several times, so each time the name gets
incremented. Do you have an example of what your talking about?
"Stephen Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 12/10/05 9:06 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
>> Is there a way to do this?
>>
>> $var = $_POST["$var"];
>>
>> I have a form that submits data, except the name of each input field is
>> incrementing. So I need to increment the $_POST var. Any ideas?
>>
>> I can't seem to get anything to work
>>
>> Chris
>
>
> What type of field are you using? In these cases I have always passed the
> data in an array and passed the post into an array variable which I could
> then increment.
>
>
>
>
> --
> Stephen Johnson
> The Lone Coder
>
> http://www.ouradoptionblog.com
> *Join us on our adoption journey*
>
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
--- End Message ---
--- Begin Message ---
I would do this instead
<input name="item[$var]" size =60 class="formdata" value="item">
Increment the $var with the {number} that you are using.
In the following PHP page
You would do
$var = $_POST['item'];
$var would then be an array accessed the same way you would access it
normally.
Does that make sense.?
On 12/10/05 9:27 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
> Here is an example of one of the fields:
> <input name="item{number}" size=60 class="formdata" value="{item}">
>
> I'm looping thru this form several times, so each time the name gets
> incremented. Do you have an example of what your talking about?
--
Stephen Johnson
The Lone Coder
http://www.ouradoptionblog.com
*Join us on our adoption journey*
[EMAIL PROTECTED]
http://www.thelonecoder.com
*Continuing the struggle against bad code*
--
--- End Message ---
--- Begin Message ---
Here is an example of one of the fields:
<input name="item{number}" size=60 class="formdata" value="{item}">
I'm looping thru this form several times, so each time the name gets
incremented. Do you have an example of what your talking about?
"Stephen Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 12/10/05 9:06 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
>> Is there a way to do this?
>>
>> $var = $_POST["$var"];
>>
>> I have a form that submits data, except the name of each input field is
>> incrementing. So I need to increment the $_POST var. Any ideas?
>>
>> I can't seem to get anything to work
>>
>> Chris
>
>
> What type of field are you using? In these cases I have always passed the
> data in an array and passed the post into an array variable which I could
> then increment.
>
>
>
>
> --
> Stephen Johnson
> The Lone Coder
>
> http://www.ouradoptionblog.com
> *Join us on our adoption journey*
>
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
--- End Message ---
--- Begin Message ---
On Sun, 2005-12-11 at 00:27, The.Rock wrote:
> Here is an example of one of the fields:
> <input name="item{number}" size=60 class="formdata" value="{item}">
>
> I'm looping thru this form several times, so each time the name gets
> incremented. Do you have an example of what your talking about?
<?php
$i = 0; // presuming 0 offset.
while( isset( $_POST['item'.$i] ) )
{
$currItem = $_POST['item'.$i];
//
// Do something with $currItem.
//
}
?>
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Stephen,
I'm using a template and so:
<input name="item{number}" size=60 class="formdata" value="{item}">
becomes:
<input name="item1" size=60 class="formdata" value="{item}">
....and so on.
But when I need to get the post data, I cannot access in the way I'm used to
like:
$var1 = $_POST['item1'];
$var2 = $_POST['item2'];
If its in an array, how do I loop thru a POST array?
"Stephen Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I would do this instead
>
> <input name="item[$var]" size =60 class="formdata" value="item">
>
> Increment the $var with the {number} that you are using.
>
> In the following PHP page
>
> You would do
>
> $var = $_POST['item'];
>
> $var would then be an array accessed the same way you would access it
> normally.
>
> Does that make sense.?
>
> On 12/10/05 9:27 PM, "The.Rock" <[EMAIL PROTECTED]> wrote:
>
>> Here is an example of one of the fields:
>> <input name="item{number}" size=60 class="formdata" value="{item}">
>>
>> I'm looping thru this form several times, so each time the name gets
>> incremented. Do you have an example of what your talking about?
>
> --
> Stephen Johnson
> The Lone Coder
>
> http://www.ouradoptionblog.com
> *Join us on our adoption journey*
>
> [EMAIL PROTECTED]
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
--- End Message ---
--- Begin Message ---
I tried that, and every combination thereafter. All I get is the following:
"PHP Parse error: parse error, unexpected"
I tried!
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 2005-12-11 at 00:27, The.Rock wrote:
>> Here is an example of one of the fields:
>> <input name="item{number}" size=60 class="formdata" value="{item}">
>>
>> I'm looping thru this form several times, so each time the name gets
>> incremented. Do you have an example of what your talking about?
>
> <?php
>
> $i = 0; // presuming 0 offset.
> while( isset( $_POST['item'.$i] ) )
> {
> $currItem = $_POST['item'.$i];
>
> //
> // Do something with $currItem.
> //
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On Sun, 2005-12-11 at 00:41, Robert Cummings wrote:
> On Sun, 2005-12-11 at 00:27, The.Rock wrote:
> > Here is an example of one of the fields:
> > <input name="item{number}" size=60 class="formdata" value="{item}">
> >
> > I'm looping thru this form several times, so each time the name gets
> > incremented. Do you have an example of what your talking about?
Ooops, forgot to update my $i. Updated below and thus avoiding the
infinte loop *lol*.
<?php
$i = 0; // presuming 0 offset.
while( isset( $_POST['item'.$i] ) )
{
$currItem = $_POST['item'.$i++];
//
// Do something with $currItem.
//
}
?>
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On Sun, 2005-12-11 at 01:15, The.Rock wrote:
> I tried that, and every combination thereafter. All I get is the following:
>
> "PHP Parse error: parse error, unexpected"
>
> I tried!
Hmmm, the following works for me verbatim in a shell script... make sure
you don't include the opening and closing PHP tags if you are already
within such tags.
<?php
$i = 0; // presuming 0 offset.
while( isset( $_POST['item'.$i] ) )
{
$currItem = $_POST['item'.$i++];
// Do something with $currItem.
}
?>
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Rob, I thought I had tried everything, except...the following:
$item = $_POST["item$i"]; //Where $i increments and loops thru my POST
vars...WOHOO!
This actually works. Why it works, I'll never know. but it does!
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 2005-12-11 at 00:41, Robert Cummings wrote:
>> On Sun, 2005-12-11 at 00:27, The.Rock wrote:
>> > Here is an example of one of the fields:
>> > <input name="item{number}" size=60 class="formdata" value="{item}">
>> >
>> > I'm looping thru this form several times, so each time the name gets
>> > incremented. Do you have an example of what your talking about?
>
> Ooops, forgot to update my $i. Updated below and thus avoiding the
> infinte loop *lol*.
>
> <?php
>
> $i = 0; // presuming 0 offset.
> while( isset( $_POST['item'.$i] ) )
> {
> $currItem = $_POST['item'.$i++];
>
> //
> // Do something with $currItem.
> //
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Rob, I thought I had tried everything, except...the following:
$item = $_POST["item$i"]; //Where $i increments and loops thru my POST
vars...WOHOO!
This actually works. Why it works, I'll never know. but it does!
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 2005-12-11 at 00:41, Robert Cummings wrote:
>> On Sun, 2005-12-11 at 00:27, The.Rock wrote:
>> > Here is an example of one of the fields:
>> > <input name="item{number}" size=60 class="formdata" value="{item}">
>> >
>> > I'm looping thru this form several times, so each time the name gets
>> > incremented. Do you have an example of what your talking about?
>
> Ooops, forgot to update my $i. Updated below and thus avoiding the
> infinte loop *lol*.
>
> <?php
>
> $i = 0; // presuming 0 offset.
> while( isset( $_POST['item'.$i] ) )
> {
> $currItem = $_POST['item'.$i++];
>
> //
> // Do something with $currItem.
> //
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Rob, I thought I had tried everything, except...the following:
$item = $_POST["item$i"]; //Where $i increments and loops thru my POST
vars...WOHOO!
This actually works. Why it works, I'll never know. but it does!
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 2005-12-11 at 00:41, Robert Cummings wrote:
>> On Sun, 2005-12-11 at 00:27, The.Rock wrote:
>> > Here is an example of one of the fields:
>> > <input name="item{number}" size=60 class="formdata" value="{item}">
>> >
>> > I'm looping thru this form several times, so each time the name gets
>> > incremented. Do you have an example of what your talking about?
>
> Ooops, forgot to update my $i. Updated below and thus avoiding the
> infinte loop *lol*.
>
> <?php
>
> $i = 0; // presuming 0 offset.
> while( isset( $_POST['item'.$i] ) )
> {
> $currItem = $_POST['item'.$i++];
>
> //
> // Do something with $currItem.
> //
> }
>
> ?>
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On Sun, 2005-12-11 at 02:03, The.Rock wrote:
> Rob, I thought I had tried everything, except...the following:
>
> $item = $_POST["item$i"]; //Where $i increments and loops thru my POST
> vars...WOHOO!
>
> This actually works. Why it works, I'll never know. but it does!
*lol* It's semantically the same as what I posted for you :)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Hi,
I have this source code in this randomImage.php file (see source):
http://www.tuxdoit.com/randomImage.phps
This generates a random image for form validation.
Now, as you can see, i call the picture from
http://www.tuxdoit.com/newslwetter.php
as
<img src="randomImage.php">
and that works just fine.
But... i'd like to include the source code of randomImage.php in a
generic functions.php file along with others.
My problem is i'm not being able to do that.
If i move the code to functions.php, what modifications must be made to
the image generation code and how do i call it from newsletter.php ?
I've already tried to make it a function, of course, but no good :(
I'm driving nuts with this :(
Any help would be apreciated.
Warm Regards,
MARG
--- End Message ---