gotcha41
Jul 14 2005, 11:26 AM
| | i would like to add a form on my site, that let's you fill in your e-mail address in order to subscribe to a newsletter. Actually, i just need to see their addresses somewhere (in a textfile, database, forward to my e-mailaddress,..). How can this be done? I mean, which script do i have to use?
There is a database available. Php is enabled. I have no acces to cgi-bin, if that's needed.
I hope someone can help me with this.
The alternative would be that there is a link on my site so that they can mail it to me, but prefer a script Any ideas? thanks in advance!  |
Reply
gotcha41
Jul 14 2005, 11:28 AM
Maybe the Coppermine Photo Gallery scripts are useful? The site is based on Coppermine's Photo Gallery system.
Reply
palladin
Jul 14 2005, 12:31 PM
Try this: FORM CODE <form name="newsletter" method="post" action="newsletter.php"> <p> <input type="text" name="nl_email"> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form>
TABLE in sql CODE ID: int autoincrasing index NL_EMAIL: string
newsletter.php file CODE <?php if ( isset($HTTP_POST_VARS['nl_email'])) { $nl_email = $HTTP_POST_VARS['nl_email']; $dbh=mysql_connect (HOST, USER, PASSWORD) or die ('DB is OFF'); mysql_select_db (TABLE NAME); $query = "INSERT INTO TABLE NAME (`NL_EMAIL`) VALUES ('".$nl_email."')"; $result = mysql_query($query); print "Your email is add. Nice day"; } else { print "Don't see email adress."; } ?>
Dont forget to change HOST, USER, PASSWORD, TABLE NAME to right values. With this you get a list of emails putting by users on in form, if you need a script for sending this news letter just ask :]
Reply
gotcha41
Jul 14 2005, 01:03 PM
ok, thanks a lot, this is what i was looking for, but one question: can you be more specific on what to do with the database? (in phpmyadmin) i'm not that familiar with mysql. But i do can run a query on my database. can you give me something like: CODE CREATE TABLE cpg_online ( user_id int(11) NOT NULL default '0', user_ip tinytext NOT NULL, last_action datetime default NULL, PRIMARY KEY (user_id,user_ip(15)) ) TYPE=MyISAM; thanks a lot
Reply
palladin
Jul 15 2005, 01:00 AM
sql CODE SQL-query: CREATE TABLE `nl_table` ( `ID` INT NOT NULL AUTO_INCREMENT , `NL_EMAIL` TEXT NOT NULL , INDEX ( `ID` ) );
php CODE $sql = 'CREATE TABLE `nl_table` (' . ' `ID` INT NOT NULL AUTO_INCREMENT, ' . ' `NL_EMAIL` TEXT NOT NULL,' . ' INDEX (`ID`)' . ' )';
But first you need create database in CPANEL, next create user to this database add to this user full acces, then you can create tables in this new database. MySQL Database button in CPANEL. -------------------- Practice is when evrything is work but no one know why. Theory is when work nothing but evry one know why. Programmers join Practice with Theory - nothing work and no one know why
Reply
gotcha41
Jul 15 2005, 09:35 AM
or just run the query in phpmyadmin thanks a lot  . You are very helpful!
Reply
Recent Queries:--
jvascript password string - 384.52 hr back. (1)
Similar Topics
Keywords : text typed sort newsletter subsciption- Text Image Java Problem
- How to include text and image in some scrollable container? (1)
- How Do You Make Text In A <div> Change When You Click On A Link?
- something to do with jvascript (4)
Say I have a link and some text. How would I make it so that when I clicked on the link, that text
changed?...
Link In Search Form
- Open a link inside a text area... (2)
i added a javascript search to my site Search basically i wanted to have links on there so that
when u click the link it runs the search. instead of making ppl type it into the textarea and
clicking go. or have it so when u click the link it enters text into the text area and then
searchs... anyone know what im chatting about? ~thanks Please make sure that Topic title has to
be descriptive. ...
Reading From A Text File
- (8)
Reading from a text file whats up guys, got some more questions. we are starting to learn how to
write and read strings to/from txt files. wel thats pretty easy, but how would i retrieve only the
first 2 lines of the txt file, for example, if i wanted the first 2 lines, not any other, how would
i do it: 12 90 12 6 -9 how would i go baout doin this. thnks ke...
Writing A Text File On Wen Host
- write to the text file on the webhost (1)
Hi! i need to write a text file with applet on the wen host. It is like a guest book that the
visitor enters his comments and the comments are stored in the text file. I found a website which
presents a method to write text files to the visitor's computer but i need to write the text
file to the webhost the applet is hosted. its like a log file or a guest book. I know there is a
way and it can be done but i can't figure it out! Any help would be appreciated!
Thanks! kvarnerexpress Topic title and description are VERY import to this forum. Edit ...
Onclick Image ->> Add Text To Input(text)field?
- (3)
when some images get clicked, a text should added to an input(textfield). Does someone know how this
can be done? I suppose it can be done via javascript. thanks in advance! /cool.gif' border='0'
style='vertical-align:middle' alt='cool.gif' /> If you need more information, just ask
/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> ...
Where Do I Put The Text?
- (0)
I actually downloaded this menu applet from Magic Rainbow Buttons I made my own image to use for
the eye HERE My question is how do I insert text? and where exactly?? here's the source:
<!--param name=transition-frames value=20> HERE'S The text edit I
use: // Create a menu.txt file using the index editor "text:" "1" "" "" "" "text:" "1" "" "" ""
"text:" "1" "" "" "" "text:" "1" "" "" "" "text:" "1" "" "" "" "text:" "1" "" "" "" "text:" "1" ""
"" "" "text:" "1" "" "" "" "text:" "1" "" "" "" "text:" "1" "" "" ""...
Glowing text on mouseover...
- java scripting .. (4)
One more script for today ... /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0"
alt="biggrin.gif" /> The text glows on mouseover of the page which will draw the eyes of your
visitor. Good to use on important lines of text that you want noticed. The colors can be changed
easily to blend in with your background color, as can be the font style and size. Installation:
STEP 1: Copy the code below and paste this into the of your html document. Comments have been
inserted where you change the text size, type and colors at the top part of the scr...
Looking for store, text, typed, form, sort, newsletter, subsciption, form
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for store, text, typed, form, sort, newsletter, subsciption, form
*MORE FROM TRAP17.COM*
|
advertisement
|
|