Re: [PHP] help with form

2004-01-17 Thread Justin French
On Sunday, January 18, 2004, at 01:39  PM, eawilkes wrote:

I'm creating a form that puts data into two different tables in the
database.  I was wondering how to get the "ID" from the first table 
and, in
the "background", associate it with the second table?

any help is GREATLY appreciated!
Check out mysql_insert_id() -- there's an example in the manual of how 
to determine what was the ID of the row you just inserted.

http://www.php.net/mysql_insert_id

FYI, this page was easy to find searching the PHP manual functions for 
"mysql id" -- perhaps a timely reminder that you should search the 
manual before posting a question???

Come back if you need more help after that.

Justin French

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] help with form

2004-01-17 Thread daniel
> I'm creating a form that puts data into two different tables in the
> database.  I was wondering how to get the "ID" from the first table
> and, in the "background", associate it with the second table?
>
> any help is GREATLY appreciated!
>

Firstly you never said which db ? I'll assume mysql, check out
mysql_insert_id


> --
> 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] help with form

2004-01-17 Thread eawilkes
I'm creating a form that puts data into two different tables in the
database.  I was wondering how to get the "ID" from the first table and, in
the "background", associate it with the second table?

any help is GREATLY appreciated!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Help With Form Mail

2003-02-11 Thread Marek Kilimajer
mail($mailto, $mailsubj, $msg, $mailheader);

- where does $mailto come from?



WAW wrote:


Hello All,
I have a problem. I did this form mail script and it is sending the
email to the poster not the email specified in the $mailto. Can someone
help me. Sorry it will be long, the code that is:
CODE:

//File_name = send_form.php//

include "header.htm";
include "setup.php";

$msg .= "Senders Name:  \t$_POST[senders_name]\n";
$msg .= "Senders Email: \t$_POST[senders_email]\n\n";
$msg .= "Message:   \t$_POST[message]\n\n";
$msg .= "From:  \t$_POST[senders_name]\n\n";
$mailheader .= "Reply To:  \t$_POST[senders_email]\n\n";

mail($mailto, $mailsubj, $msg, $mailheader);
?>


Email Sent Successfully!!!


The Following E-Mail Has Been Sent Successfully:
Your Name:

Your Message







And Here is the include file (setup):

//File_Name = "setup.php"//

//Change below to your email address//
$mailto = "[EMAIL PROTECTED]";

//change below to your subject//
$mailsubj = "FeedBack";

//change below to the Subject you want in the email,//
//LEAVE THE \n AT THE END//
$msg .= "Email Feedback From Site\n";
?>

Thanks in advance!! :-)  I am new at the PHP programming thing, so bare
with me.

Thanks, WAW
 http://reptilians.org
Forums:   http://reptilians.org/boards 

http://allscripts.reptilians.org/cgi-bin/index.cgi


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help With Form Mail

2003-02-11 Thread WAW
Hello All,
I have a problem. I did this form mail script and it is sending the
email to the poster not the email specified in the $mailto. Can someone
help me. Sorry it will be long, the code that is:
CODE:



Email Sent Successfully!!!


The Following E-Mail Has Been Sent Successfully:
Your Name:

Your Message






 
And Here is the include file (setup):

 
Thanks in advance!! :-)  I am new at the PHP programming thing, so bare
with me.
 
Thanks, WAW
  http://reptilians.org
Forums:   http://reptilians.org/boards 
 
http://allscripts.reptilians.org/cgi-bin/index.cgi
 



Re: [PHP] help with form adding to database!!

2003-01-03 Thread Marek Kilimajer
|$sql = "INSERT into $table_name (f_name, l_name, username, password)
Values ('$f_name', '$l_name', '$username', '$password')";|

notice the single quotes

Karl James wrote:


Hey guys,

I cant figure out what’s wrong with this code.
Im sure its syntax can some one take a look at it and 
Help me out

What im trying to do is create a form for sign up. 
So that the values will be added to the table in the databse..

For log in purposes.

Thanks 
Karl 
Here is the code.

HYPERLINK
"http://host.makethewebsecure.com/~admin12/do_adduser.phps"http://host.m
akethewebsecure.com/~admin12/do_adduser.phps



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002


 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] help with form adding to database!!

2003-01-02 Thread Karl James
Hey guys,
 
I cant figure out what’s wrong with this code.
Im sure its syntax can some one take a look at it and 
Help me out
 
What im trying to do is create a form for sign up. 
So that the values will be added to the table in the databse..
 
For log in purposes.
 
Thanks 
Karl 
Here is the code.
 
HYPERLINK
"http://host.makethewebsecure.com/~admin12/do_adduser.phps"http://host.m
akethewebsecure.com/~admin12/do_adduser.phps
 
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
 



Re: [PHP] Help with form

2002-11-09 Thread @ Edwin
Hello,

"Karl James" <[EMAIL PROTECTED]> wrote:

> http://www.ultimatefootballleague.com/Create_Account.htm
>
> Im Trying to create this form so that this will give you access to login
> Team action page
> Where you can do the add/drops Trades and submit starters..

I suggest you try something simpler.

> SO what im trying to do on this form  is have the results mailed to me
> in my in box and be able to view
> All the user imported on the form in my email body that I rec, but when
> I test this code out.
> It only provides a postdata.att
> With nonthing in the email body.

Why don't you try something like this first. Create a form that

1. When a visitor clicks on "Submit", the entered data would be echoed to
the browser.

Simply googling for "forms php", I found an interesting tutorial:

  http://www.phpfreaks.com/phpmanual/page/tutorial.forms.html

Try it first or the others in the results page. (I didn't really read it but
it looks good.) Then,

2. After that you might want to learn how to validate the data entered--you
don't want any bad/malicious data being sent to you or to your server, no?

  (Again, you can google for this or even search the archives how to do it.)

3. THEN, perhaps you can learn how to send mail using forms. You might want
to do some reading first in the manual:

  http://www.php.net/manual/en/ref.mail.php

> Any help with this would be greatly appreciated.

HTH,

- E

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help with form

2002-11-09 Thread Paul Roberts
why don't you submit it to a php script (instead of using the mailto ) and get mail() 
to email it to you, you could also process it and save the info somewhere.


Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: "Karl James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 12:44 AM
Subject: [PHP] Help with form


http://www.ultimatefootballleague.com/Create_Account.htm
 
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
 
SO what im trying to do on this form  is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
 
Any help with this would be greatly appreciated.
 
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong 
As im starting from the beginning and trying to learn forms and php
together
 
Thanks for your understanding.
 
Sincerely
Karl James "The_Saint" irc tag



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help with form

2002-11-09 Thread Karl James
http://www.ultimatefootballleague.com/Create_Account.htm
 
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
 
SO what im trying to do on this form  is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
 
Any help with this would be greatly appreciated.
 
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong 
As im starting from the beginning and trying to learn forms and php
together
 
Thanks for your understanding.
 
Sincerely
Karl James "The_Saint" irc tag



[PHP] Help with form validate script and the way it handles redirections.

2002-03-11 Thread jhj hjhjhj

Hey People:

I made a form validator script, it redirects you back
to the page you were 
before if you have an error. To do this iam putting a
hidden entry that is 
$REQUEST_URI . So if the script needs to redirect you
back itll do  this: 
header("Location:
?$reference&message=another_message"); 
The problem with this is that the form is put as an
include in many pages, some 
people access the page from index.php others from
index.php?page=21 So if they 
are accessing it from plain index.php itll add a & (as
you saw on the code)
but 
i guess this is ok? or anybody know of a better way to
do this?

Josepablo




_
Do You Yahoo!?
La emoción e intensidad del deporte en Yahoo! Deportes. http://deportes.yahoo.com.mx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php