[PHP] Fields into Combo Box

2001-03-09 Thread RealGM

Hi,

I just have a couple of questions that I hope some people will know the answers to.

1. I am hoping to read the entire range of values from a field in my MySQL table into 
a combo box on my form, but I am not sure how.  On top of that, I want the user to 
select one value from this list, press next, and the combo box reappears with the full 
list minus the chosen value.  The user then chooses another, presses next, and the 
combo box then appears again, minus the two chosen values.  This loop continues until 
flagged.

Does anyone have any ideas how I can do this?

2. I have created a session variable $session.  This is an array.  I have a dynamic 
variable, ${"myvalue$counter"}, which has particular values assigned.  The number of 
instances varies depending on the data in the database, so it is difficult to go 
through and assign each value to the session variable manually, eg 
$session["myvalue1"], $session["myvalue2"], etc.  Is there any way I can incorporate 
dynamic variable names into the array structure like above.  I have searched around, 
but I am not really sure what this would come under.

3. This is similar to above, but it refers to functions.  Is it possible to have 
dynamic function names that actually change from where you call it?

eg. $value=1;
(call function from within another file)
function name$value (...)
$value=2;
(call same function from within the same file as before)
function name$value (...)

Is this possible with php?

Thank you very much for your time,
Michael.



[PHP] Fields, Comboboxes, repost

2001-03-09 Thread RealGM

Hi,

I just have a couple of questions that I hope some people will know the answers to.

1. I am hoping to read the entire range of values from a field in my MySQL table into 
a combo box on my form, but I am not sure how.  On top of that, I want the user to 
select one value from this list, press next, and the combo box reappears with the full 
list minus the chosen value.  The user then chooses another, presses next, and the 
combo box then appears again, minus the two chosen values.  This loop continues until 
flagged.

Does anyone have any ideas how I can do this?

2. I have created a session variable $session.  This is an array.  I have a dynamic 
variable, ${"myvalue$counter"}, which has particular values assigned.  The number of 
instances varies depending on the data in the database, so it is difficult to go 
through and assign each value to the session variable manually, eg 
$session["myvalue1"], $session["myvalue2"], etc.  Is there any way I can incorporate 
dynamic variable names into the array structure like above.  I have searched around, 
but I am not really sure what this would come under.

3. This is similar to above, but it refers to functions.  Is it possible to have 
dynamic function names that actually change from where you call it?

eg. $value=1;
(call function from within another file)
function name$value (...)
$value=2;
(call same function from within the same file as before)
function name$value (...)

Is this possible with php?

Thank you very much for your time,
Michael.




[PHP] Combo Box containing field

2001-03-10 Thread RealGM

Hi,

Does anyone know how I can create a combo box in my php file that reads the options in 
from a database field?

I can create combo boxes fine containing values that I enter, but I want it to read 
the values from the database into the drop down box for the user to select.

Thanks,
Michael.




[PHP] Dynamic Arrays?

2001-03-15 Thread RealGM

Hi,

I have a bit of a dilemma.

I have a number of array attributes, eg. $arrayname["var1"], $arrayname["var2"], 
$arrayname["var2"], etc. up to 58, and I want to write these into the database.

What I am hoping to do is create a counter that goes through the insert routine, 
updating the numerical value of "var".  The problem is.. everything I have tried 
hasn't worked.

I have tried things like...

$counter=1;

$arrayname[["var".$counter1]];
$arrayname["var$counter1"];
 
...and variations thereof.  Everything I have tried has failed.

PLEASE can someone help??





[PHP] Back Button Dilemma's

2001-04-09 Thread RealGM

Hi Guys,

I know everywhere it says that it is not possible to actually disable the back button, 
and people have offered some solutions that have not worked for me, this is why I am 
emailing this list.

I have a form which displays the same page with new content (controlled by a counter) 
in a loop until an exit point is reached.  When the user clicks back on the browser 
the counter still increments and the screen continues like the user pressed the 
continue button (which is the process I want the user to take).  The problem is the 
user did not make a selection and this is where the problem lies (it takes the 
default, which throws the whole process out of whack).

The question I am asking is how can I prevent the user trying to go back?  Is there 
any code out there which can counter this action (and not cause my counter to 
increment, thus moving the user to the next screen)?  Is there any way to detect that 
the back button/option has been selected and display a "warning" type page before 
going back to where the user is?  The forward counter action does not really fix my 
problem.

Thanks,
Michael.

Chief Information Officer,
RealGM, Inc.
http://www.realgm.com




[PHP] Mail Function

2001-04-11 Thread RealGM


Hi,

Tonight was my first attempt at using the mail() function, and running the script I 
had no problems with execution.  Everything seemed to go smoothly, except for one 
thing.  I never received an email.

I have consulted the manual and found nothing on the questions I am about to ask.  Is 
there any way of confirming whether an email was actually sent, or if there like a log 
file I can check?  The server is running php4 via apache on a linux machine.

Any help would be appeciated, as I have no idea what could (or could not) be happening.

Thank you,
Michael.



Re: [PHP] Mail Function

2001-04-11 Thread RealGM

Thanks for the reply...

It comes back mail sent, but nothing is actually arriving..

- Original Message -
From: Zeus <[EMAIL PROTECTED]>
To: RealGM <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2001 7:29 PM
Subject: Re: [PHP] Mail Function


> Try adding a
>
> if (!mail(blah blah, balh blah )) {
> echo "Mail not sent";
> }
>
> if (mail(blah bal.)) {
> echo "Mail sent";
> }
>
> Try these and subsitute what ever is in the mail() with your relevant
> information.
>
> - Original Message -
> From: RealGM <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, 11 April, 2001 5:16 PM
> Subject: [PHP] Mail Function
>
>
>
> Hi,
>
> Tonight was my first attempt at using the mail() function, and running the
> script I had no problems with execution.  Everything seemed to go
smoothly,
> except for one thing.  I never received an email.
>
> I have consulted the manual and found nothing on the questions I am about
to
> ask.  Is there any way of confirming whether an email was actually sent,
or
> if there like a log file I can check?  The server is running php4 via
apache
> on a linux machine.
>
> Any help would be appeciated, as I have no idea what could (or could not)
be
> happening.
>
> Thank you,
> Michael.
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Comparing Memory Variables

2001-01-13 Thread RealGM Webmaster

Hi Everyone,

I am having a little trouble getting a memory variable and a session variable to 
compare correctly

I have an if statement as below:

if ($id=='{$SESSION["id"]}') {
echo "working";
}

ID is a memory variable that is equal to five, and the session variable id is also 
equal to five.

When I do through the check again $id is set to be the characters {$SESSION["id"]} 
rather than the five that it was previously assigned to.

Basically what it is doing is assigning the characters proceeding the = sign to the 
variable $id rather than doing the comparison.

Does anyone know how I can get around this.  I tried two = signs and the working 
message does not display, but one = sign displays the message but does it also changes 
the value of $id.

Has anyone got any idea how I can get around this problem?

Thanks,
Michael.