|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 11 Dec 2005 14:32:19 -0000 Issue 3844
php-general-digest-help
lists.php.net
Date: Sun Dec 11 2005 - 08:32:19 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
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
attached mail follows:
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?
attached mail follows:
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
>
attached mail follows:
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 <mwu
suncosys.net> 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
attached mail follows:
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 <mwu
suncosys.net>/* 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
>
>
attached mail follows:
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.
attached mail follows:
> 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
attached mail follows:
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.
attached mail follows:
š™
|EEE‘f“G‚Èo‰ï‚¢‚ðŒ©‚Â‚¯‚Ü‚¹‚ñ‚©EEE|
š™




¡ Š®‘S–³—¿I‘f“G‚È‘ŠŽè‚ðGETI




¡ ’j«–³—¿‰ïˆõI‘å•‘ˆõ’v‚µ‚Ü‚·I

««yƒ‰ƒu™ƒŠƒ“ƒOz‚ÍŽ©—R—öˆ¤‚ðŽx‰‡‚·‚éƒRƒ~ƒ…ƒjƒeƒBƒTƒCƒg‚Å‚·B
http://d-ai-desire.com/web/web_h5.html
™š™š™š™š™š™š™š™š™š™š™š™š™š™š™š™š™š

¡‰ñA‹M•û—l‚ɓˑR‚̃[ƒ‹‚ð‚³‚¹‚Ä’¸‚¢‚½‚̂ɂ͗—R‚ª‚ ‚è‚Ü‚·B








«
«
«
«
«
«
«
«
„¬„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„ª„
™Œ»Ýyƒ‰ƒu™ƒŠƒ“ƒOz‚ÍA—«‚Ì•û‚ÌŠó–]ŽÒ‚ª”š”“I‚É‹}‘‚µA 



’j—”ä—¦‚ª•΂è’j«—l‚ª‚È‚‚È‚Á‚½ˆ×‚ÉAŠó–]—«‚ɑ΂µ‚Ä–ž‘«‚É’j«—l
‚ð‚²Ð‰î‚·‚鎖‚ª”ñí‚É¢“ï‚ɂȂÁ‚Ä‚µ‚Ü‚¢‚Ü‚µ‚½B

™‚±‚ñ‚È•û‚ª‘½‚¢‚Å‚·B




–Š„‚èØ‚Á‚½‚¨•t‚«‡‚¢‚ðl‚¦‚Ă܂·I


–Œ¾—t‚Å‚¢‚¦‚È‚¢‚±‚Æ‚¢‚Á‚Ï‚¢‚µ‚½‚¢‚È(*^-^*)I


–Žï–¡‚̓rƒŠƒ„[ƒh‚Å‚·I‚Å‚àƒGƒbƒ`‚àEED‚«(*^-^*)!


–‚¿‚å‚Á‚ÆSM‚É‚à‹»–¡‚ª‚ ‚è‚Ü‚·(ÞÜ*)I


–Ž„EEE‚²Žål—l‚¢‚Ü‚¹‚ñ‚©(ToT)I


–—öl•åW’†‚Å‚·(;_;)




‚Ȃǂ̗‚ÌŽq‚ª‘½”‘Ò‚Á‚Ä‚¨‚è‚Ü‚·I









™‚»‚±‚Å’j«—l‚Ìl”‚ð’²®‚µAŠó–]‚·‚é’j—‚ÌŠF—l‚ɉ~–ž‚Èo‰ï‚¢‚ð‚µ‚Ä’¸
‚ˆ×‚ÉA’j«—l‚Ì–³—¿‰ïˆõ‚Ì‘ˆõ‚É“¥‚ÝØ‚èA¡‰ñ‹M•û—l‚Ƀ[ƒ‹‚ð‚³‚¹‚Ä
’¸‚¢‚½ŽŸ‘æ‚Å‚·B
‚±‚ÌЉî‚ÉŠÖ‚·‚éî•ñ”zM‚ð’âŽ~‚µ‚½‚¢•û‚Í
‰º‹L‚Ì”zM’âŽ~Šó–]ê—p‚̃[ƒ‹ƒAƒhƒŒƒX‚æ‚è‹óƒ[ƒ‹‚ð‚¨‘—‚艺‚³‚¢B
info999
ok.kz
attached mail follows:
Got it fixed now... tnx...
-----Original Message-----
From: Ben Blay [mailto:benblay
gmail.com]
Sent: Friday, December 09, 2005 9:46 AM
To: Mark Steudel
Cc: php-general
lists.php.net
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 <mark
netriver.net> 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:benblay
gmail.com]
> Sent: Thursday, December 08, 2005 10:27 AM
> To: php-general
lists.php.net
> 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
attached mail follows:
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
attached mail follows:
On 12/10/05 9:06 PM, "The.Rock" <czimmerman01
hotmail.com> 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*
stephen
thelonecoder.com
http://www.thelonecoder.com
*Continuing the struggle against bad code*
--
attached mail follows:
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" <maillists
thelonecoder.com> wrote in message
news:BFC0F625.2154D%maillists
thelonecoder.com...
> On 12/10/05 9:06 PM, "The.Rock" <czimmerman01
hotmail.com> 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*
>
> stephen
thelonecoder.com
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
attached mail follows:
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" <maillists
thelonecoder.com> wrote in message
news:BFC0F625.2154D%maillists
thelonecoder.com...
> On 12/10/05 9:06 PM, "The.Rock" <czimmerman01
hotmail.com> 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*
>
> stephen
thelonecoder.com
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
attached mail follows:
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" <maillists
thelonecoder.com> wrote in message
news:BFC0F625.2154D%maillists
thelonecoder.com...
> On 12/10/05 9:06 PM, "The.Rock" <czimmerman01
hotmail.com> 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*
>
> stephen
thelonecoder.com
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
attached mail follows:
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" <czimmerman01
hotmail.com> 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*
stephen
thelonecoder.com
http://www.thelonecoder.com
*Continuing the struggle against bad code*
--
attached mail follows:
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" <maillists
thelonecoder.com> wrote in message
news:BFC0F625.2154D%maillists
thelonecoder.com...
> On 12/10/05 9:06 PM, "The.Rock" <czimmerman01
hotmail.com> 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*
>
> stephen
thelonecoder.com
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
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" <maillists
thelonecoder.com> wrote in message
news:BFC0FAE2.2155C%maillists
thelonecoder.com...
>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" <czimmerman01
hotmail.com> 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*
>
> stephen
thelonecoder.com
> http://www.thelonecoder.com
>
> *Continuing the struggle against bad code*
> --
attached mail follows:
I tried that, and every combination thereafter. All I get is the following:
"PHP Parse error: parse error, unexpected"
I tried!
"Robert Cummings" <robert
interjinn.com> wrote in message
news:1134279673.8935.7.camel
blobule.suds...
> 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. |
> `------------------------------------------------------------'
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
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" <robert
interjinn.com> wrote in message
news:1134282275.8935.10.camel
blobule.suds...
> 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. |
> `------------------------------------------------------------'
attached mail follows:
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" <robert
interjinn.com> wrote in message
news:1134282275.8935.10.camel
blobule.suds...
> 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. |
> `------------------------------------------------------------'
attached mail follows:
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" <robert
interjinn.com> wrote in message
news:1134282275.8935.10.camel
blobule.suds...
> 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. |
> `------------------------------------------------------------'
attached mail follows:
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. |
`------------------------------------------------------------'
attached mail follows:
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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]