Thanks guys, I didn't know that... One more happy day...
Afan
- Original Message -
From: Mike Flynn
To: Nicole Amashta ; [EMAIL PROTECTED] ; [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 11:03 AM
Subject: Re: [PHP-WIN] im so stupid
At 10:43 AM 2/12/2002
At 10:43 AM 2/12/2002 -0500, Nicole Amashta wrote:
>Not in the least. That is not the same at all. You are referencing the
> button.
>
>I am referencing a hidden field that is set with that value no matter what.
Exactly. I learned this the hard way. Don't rely on the submit button at
all. IE
7280$311f49d1@VAIO...
Hm, isn't that the same I said yestreday (you don't need set value for
action):
Afan
- Original Message -
From: Nicole Amashta
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 10:34 AM
Subject: Re: [PHP-WIN] im so stupid
AHA! That is i
So, do not rely on BUTTONS as variables in scripts since browsers are FUNKY
and button variables don't always get set as they should. Use hidden
variables. If you have different buttons doing different things, such as
(delete, submit, open, etc.), then make each button call a javascript to set
the
Hm, isn't that the same I said yestreday (you don't need set value for action):
Afan
- Original Message -
From: Nicole Amashta
To: [EMAIL PROTECTED]
Sent: Tuesday, February 12, 2002 10:34 AM
Subject: Re: [PHP-WIN] im so stupid
AHA! That is it, and I've
AHA! That is it, and I've encountere this before.
OK, actually $submit should be set. But do this instead:
add a hidden tag to the form as such:
=
Fornavn:
Etternavn:
=
Then, in your php script, do this:
if ( $action == "submit" )
{
## do the
t; > > $result = mssql_query($sql, $db);
> > > >
> > > >
> > > >
> > > > Success!
> > > >
> > > > You have successfully entered the following information > > > "$fornavn $etternavn"; ?>
> >
rd);
> > > > mssql_select_db($dbname);
> > > > $sql = "insert into studenter(fornavn, etternavn) values
> > > > ('$fornavn','$etternavn')";
> > > > $result = mssql_query($sql, $db);
> > > >
> > > >
> >
> > >
> > > Success!
> > >
> > > You have successfully entered the following information > > "$fornavn $etternavn"; ?>
> > >
> > >
> > >
> > >
> > >
> > > "Afan Pasalic" <[
311f49d1@VAIO...
> > Try this:
> >
> > $db = MSSQL_CONNECT($hostname,$username,$password);
> > mssql_select_db($dbname);
> > $sql = "insert into studenter(fornavn, etternavn) values
> > ('$fornavn','$etternavn')";
> > $result = mssql_qu
" <[EMAIL PROTECTED]> wrote in message
> news:005601c1b310$fa19ad80$311f49d1@VAIO...
> Try this:
>
> $db = MSSQL_CONNECT($hostname,$username,$password);
> mssql_select_db($dbname);
> $sql = "insert into studenter(fornavn, etternavn) values
> ('$fornavn',
I have made a script and for some reason i dont understand it doesnt do what
its supposed to. maybe you can tell me whats wrong. its a form where im
supposed to insert a new record in a mssql table. but when i hit submit it
just refreshes blank.
Fornavn:
Etternavn:
hope you can help.
12 matches
Mail list logo