Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Create A Simple HTML Form That Has The Standard To:, CC:, BCC:, Comments: Etc


I need to create a simple HTML form that has the standard To:, CC:, BCC:, Comments: etc. - but I need for the form to have a drop down list of "Subjects". Depending on which subject the user selects, it should email a different email address for each one for the contact.

The email addresses should be hidden and only server side. Could someone point me to a sample form which has something like this? I've Googled it all over but can't find any examples.




View Complete Forum Thread with Replies

Related Forum Messages:
Create A Simple Web Form In Order To Allow Visitors To Send Me Their Comments Via Email.
I want to create a simple web form in order to allow visitors to send me their comments via email. I created this code:

$to = "mybox@mydomain.com";
$subject = "Comments from the web";
$body = "Comments:";
$body = $body . "----------------------- ";
$body = $body . $email . "";
$body = $body . "-----------------------";
$body = $body . $name . "";
$body = $body . "----------------------- ";
$body = $body . $text . "";
$headers = "From: $email";
mail($to,$subject,$body,$headers);

'$email' is the email address of the visitor, '$name' is their name, and '$text' is the contents of the comments. But I found out that some spammers used this form to send spam. I didn't make any filter of the contents, and I was suggested they were using script injection within the form. Do you know any more-secure web form for sending emails?

View Replies !
Flash / PHP File Upload (w/out Standard HTML Form)
- i am trying to create an upload form based on a flash mx movie and a server-side php script.
- i have to avoid using the standard HTML upload form.
- local filesystem browsing function is not needed, only the given file must be transferred.
- the problem is that the php script cannot acces a local file like "c:/dir/file.ext", as the path is handled like a server-side path.
- the HTML form (enctype has to be set multipart/form-data) sends the file via the POST method. Flash is able to send information this way, too, but only files with internally specified variables like "&var=data" can be read into the flash movie - and sent as text.
- i am thinking of using a hidden form somewhere - maybe in another frame of the site (in the first one is the flash movie embedded). Another way to solve this could be a popup window with the upload form. These might work, but i am searching for a less complex solution.

View Replies !
How To Create A Session For A Simple Login Form
can anybody tell me how to make a session for a simple login form.
If you know please tell me with a coding.

View Replies !
Create A Simple Login Page Using Php And A Post Form.
trying to create a simple login page using php and a post form.

The following requirement holds,
1. there should NOT be any DB.
2. One user and one password is enough (yeah, said it was a simple
one...)

Tried with a function check_user() in a lib php-file, and a post form
in the login page. Code as follow:

<?php

function check_user(){
global $userfield, $pwdfield;

if( strcmp($_POST[$userfield],"user") == 0 ) {

if( strcmp($_POST[$pwdfield],"pwd") == 0 ) {
// Correct user
echo("correctdir/album.htm");
}
else {
// Wrong pwd
echo("../somdir/default.htm");
}
else {
// wrong user
echo("../otherdir/default.htm");
}
}

}
?>

and the login page for is:
<?PHP
require('../somelib/login_lib.php');
?>

....
<form name="form1" method="post" action="<?php check_user();?>">
<input type="text" name="userfield" >
<input type="password" name="pwdfield" >
<input type="submit" name="Log in" value="Log in">
</form>

View Replies !
Create Very Simple Form Based Content Management Systems
In the past I've created very simple form based content management systems for my clients' websites. I know there are many options available on the market from open source varieties such as phpNuke to others that can be purchased, but I'm really wary of committing my clients to any of these. However, I need to begin offering better tools to my clients. Is is better to build your own CMS to better understand the code that makes up the application or is better to invest the time or money in something that has been prebuilt.

View Replies !
Create A Form In HTML And A PHP Page For Validating The Data Entered Into The Form
I've tried to create a form in HTML and a PHP page for validating the data entered into the form and adding them into a MySQL database.

However, when i tried them out, it happens that after i press the submit button in the HTML page, it just show a blank page instead of what i expect. I've tried several times, but it is still the same and i don't know what is going wrong. Code:

View Replies !
Looking For A Simple Comments Script
for the Blog portion of our site. We would like for people to be able to leave comments and give them a reason to come back.

View Replies !
Simple Comments Page
Im trying to create a simple comments page for my website that checks for afiles existence using the datestamp as a name. For some reason I cant get my code to work - does anyone have any pointers? Code:

View Replies !
Create A Simple Email Form Where It Automatically Sends A Quick Message
I'm trying to create a simple email form where it automatically sends a quick message a user inputs to a hardcoded email address. the form i use looks like this: Code:

View Replies !
Simple Form On An HTML Email
I am sending out HTML emails to a list of addresses in a table and I am trying to put a simple POST form on each email consisting of a confirm submit button and a few hiddens.

The submit button should call up a popup that is on my server that says Thank You, we have received your confirmation etc.
The popup also holds some php/mysql that should update the table in question to say that the recipient has confirmed.

The HTML email is arriving OK, and the submit button is calling up the popup, but the form values are getting lost, so no database update is taking place.

View Replies !
Simple Comments Box, Trouble With Incomplete Tags-
I added a little comments box to my page, and left the option to add links available- but I notice after screwing around that if a link tag is left open, it pretty much breaks the entire page.

Anyway, I was curious to know if there was a *cough* easy way to fix or just cut broken tags from the message body so that my page doesn't fall apart when some fool fails to add </a> Code:

View Replies !
Use A Simple Form Into Html Verified Against A Mysql Database
I'm setting up an account login: should I use a simple form (user name and password) "embeded" into html verified against a mysql database or should I use the challenge/response scheme (also verified against a mysql database?

Basically, is there any benefit to using challenge/response over merely submitting user name and password (like a search engine)?

View Replies !
Create Form Linked To Html
I need to access an SQL database from a webpage so users can update information directly to the database (in the form of a "form"). There are a few fields from different tables in SQL that I need on the form. I have no idea how to even begin. Someone mentioned that PHP is the way to go and I've started looking through tutorials, but thought I would post the question to see if this is even the right language to use.

View Replies !
Create A Data Entry HTML Form For Given Table
I am working on a simple web site updating utility for a web site. Rather than hard code the data entry forms, I would like to automactically generate them based upon the table a user selects to update or insert into. What is the best way to approach this?

for "insert" should I use the MySQL DESCRIBE table command and build a form element for each field according to its data type? for "update" should I use the DESCRIBE command to build the form as above and SELECT statement to populate each element with data, or should I just use a SELECT statement to retrieve the data and use php to determine the field type and choose an appropriate form element?

View Replies !
Standard Html Charset?
I'm not quite a HTML newbie but this is a newbie sort of question. Just something I haven't bothered checking out until now.

What is the standard HTML charset (you know like iso-8859-1 etc.)? The website is for an English speaking market so US, UK mostly.

View Replies !
Form Script - Create The Landing Page In Html With Tags
A form that people will enter their info, and when the submit it, they will land on a page that shows the info they submitted for them to double check that it is the correct info before they confirm the submission. I have an idea that I could create the landing page in html with tags like [firstname] and [address], and have the script replace those tags with the matching field data from the form. I just can't figure out HOW to do it.
Sorry if I'm rather incoherent. just spent a long night attempting to figure this out. I'm feeling very, VERY Dense, even with my very limited PHP knowledge.

View Replies !
<html> In Comments
I want to let my users to insert html tags in comments: PHP Code:

View Replies !
XML Parsing And HTML Comments
I find myaelf writing a template system (yeah, I know - but there is a
reason I'm not using an existing one). So I'm trying to parse xhtml using
the builtin expat parser. Mostly it works fine, however it ignores anything
that looks like an HTML comment. This is a bit of a problem as I see a lot
of code written like:

<script type='text/javascript>
<!--
alert("hello world');
// -->
</script>
<style type="text/css">
<!--
..style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
-->
</style>

Now obviously the browser is seeing the stuff inside '<!--' ...'-->' but
expat doesn't. I tried adding a non-parsed handler, but still can't see it.

View Replies !
Loading All Html Comments
I'm working on a site that'll be using templates. In these templates, there will be user variables that are inside of html comments. So, <!--companyname--> will change to "Bob's Super Dooper Store" when the template is parsed. Problem is, some of the variables may involve quite a bit of work to get the right value; and I don't want the server to get tied up running functions that aren't going to get used.

So, my thinking is to do a str_replace("<!--companyname-->", function_to_get_name, $output); only if <!--companyname--> is there. What I'd like to do is to load all of the comments into an array, so that I can just do "if in_array();" then do the replacement. Problem is, I can't figure out how to parse all the comments into an array.

View Replies !
Preg_replace And HTML Comments
i need help writing a parser to replace <!-- $word --> with <img alt="tag_$word" src="images/exe.gif" class="FCK__TemplateTag" /> and then back again.

Long story short i need this to parse input from FCKeditor to replace these image tags with our template systems inbuilt tags (which are just HTML comments).

The reason i'm using image tags is because i needed a "marker" in FCKeditor's HTML view to show that a tag exists there (if i just let them insert html comments, they can't see it in the HTML view of the editor - and this is a problem for our HTML illiterate support staff).

i figured i'd be using preg_replace for such a task.. but my regular expression mastery just isn't at this level yet.

View Replies !
Control Array Syntax Vs HTML Standard
PHP allows control arrays in forms e.g. this is a counter editing script

echo "<input name="counterdelname[]" type="hidden" value="";

echo "<input name="countername[]" type="hidden"
value="".$namestr."">";

echo "<input name="newvalue[]" size=".VALUEWIDTH."
value="".$valuestr."">";

echo "<input name="delcounter[".$namestr."]" type="checkbox">";

The resultant web page might look something like this, in part: Code:

View Replies !
Regex That Finds And Replaces Stuff Between (2) Html Comments
I'm not good with regex, I've search for a couple hours and couldn't find it so here I am. I'm looking for a regex that finds and replaces stuff between (2) html comments. I.e. Code:

View Replies !
Transferring Data From A Form To PHP With A Standard Script
I'm pretty new to PHP/forms...and I've got a pretty dumb problem (i.e. there is probably an easy solution).

Well, I'm unsure of how to describe the problem, so I'll just give an example.

Checkbox: Red
Checkbox: Blue
Checkbox: Yellow

How would I get that information in to PHP (query) without knowing in advance what the names on the checkboxes were? The only solution my programming-retarded brain can come up with is running a loop to try every possible name that the checkbox could have...which, I'm sure, is a great idea *laughs*

If my question doesn't make sense, I apologize. I did my best, but I'll give it another shot if it's confusing.

View Replies !
PHP/GD/ Freetype : Captcha For A Comments Form
I am trying to create a captcha for a comments form, I do not get any PHP errors but the image showing the captcha does not display. If I right click "View Image" on the image placeholder I get "The requested URL /test/81d8c.gif was not found on this server."

I am using PHP v.5.2.4 with GD & freetype enabled. I use an Apache 2...

View Replies !
Form That Leaves Comments On Page
I have a page with a user comments input form on it. I would like the users comments to be added to that page once it is posted.

View Replies !
Form Validation For Posting Blank Comments
I can get through this and post blank comments at will; what's wrong with the validation.

$comment1 = $_POST['comment'];
if (!isset($_POST['comment'])) {
header ("Location: http://www.site.com/error.php");
exit();
} elseif (empty($comment1)) {
header ("Location: http://www.site.com/error.php");
exit();
} else {
$comment2 = nl2br($comment1);
$comment3 = str_replace ('<a ','<a rel="nofollow" ',$comment2);
// then execute rest of formhandler...
}

View Replies !
Create A Simple Feed
I found an article which explains how to create a simple feed and created this: Code:

View Replies !
Create A Simple Onclick Event
I'm not proficient at either and have trouble understanding why I can't get the 2 to work together. I am trying to create a simple onclick event. Code:

View Replies !
Form Processing - Create A Form Processor With Processes The Form To A Page
I have searched the internet for this. I want to create a form processor with processes the form to a page which only certain people can access. I got everything down but the form processing. Does anyone have this code or can you lead me to the right direction?

View Replies !
Simple Loop Issue To Create Varibles
i have this loop where i want to create a variable based on the iteration (i think thats what its called): PHP Code:

View Replies !
Create A Simple Image Conversion Class
I have spent the last age trying to create a simple image conversion class, and have just not been able to get anywhere. I am limited to using the PHP GD Library unfortunately, so image magick is not an option.

I have managed to convert from:

.jpg to .gif and .png

But I need to convert from:

.jpg to .bmp and .tiff

I tried this code:

      $image = @imagecreatefromjpeg($filename);
      if ($image === false) { die ('Unable to open image'); }
      $height = imagesy($image);
      $width = imagesx($image);
      $bmpdest = "../bmp/" . $rand . ".bmp";
      $bmp = jpeg2wbmp($filename, $bmpdest, 100, 100, 4);

But the .bmp is shown as invalid when I try open with an application.

View Replies !
Create A Simple Link Such As <a Href="test.php>Click Here</a>
I create a simple link such as <a href="test.php>Click here</a> as i expect the browser will display the contents of that file. Now i created some simple .php files, which when i click on them i would like to get the download box to download the file, instead of opening it in my web browser.

View Replies !
Create A Simple Transaction Handling System Where Users Pay Eachother Via Points Of A Sort.
this might better be suited for the MySQL newsgroup, but I
figured I'ld post here and see if anyone can help me.

I'm trying to create a simple transaction handling system where users
pay eachother via points of a sort.
I have a table where each transaction is stored, in a single row.
It looks like this

transid,from_user,from_amount,to_user,to_amount

Given the above, I just want a simple single SQL statement that can
return a full balance.
Now originally I did this in PHP by querying the DB with the following.

$query[0] = "SELECT SUM(to_amount) WHERE to_user = '$user->uid'";
$query[1] = "SELECT SUM(from_amount) WHERE from_user = '$user->uid'";
$deposits = mysql_result(mysql_query($query[0]);
$withdrawls = mysql_result(mysql_query($query[1]);
$balance = $deopsits - $withdrawls;

This works great, so I populated the DB with over 100,000 records and
now page loads take 75-80 seconds for the total balance sheet page (I
just loop through each user, and there are 100 users), and upwards of
10 seconds on a single user query.

After analyzing the code in the profiler (I'm using Zend), I found the
largest optimization I could make would be to cut out the 2 queries
variable assignment and simple math (basically all of the code above),
and move it into a single SQL statement that does all the math.

This SHOULD be elementary, but unfortunately, MySQL doesn't like my
solution, and searching everywhere I could, I can't seem to find where
anything similar has every been tried. But come on, I know I can't be
the first person in history with a similar need for a query like this.

Here is the most elegant solution I could come up with, in all it's raw
SQL glory.

SELECT SUM(to_amount - from_amount) as balance FROM
((SELECT from_amount as withdrawls FROM transactions WHERE from_user =
&#391;')
(SELECT to_amount as deposits FROM transactions WHERE to_user = &#391;'));

Sadly, even though by every measure I can find it SHOULD work, it just
doesn't.
I keep getting

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near '(SELECT to_amount as deposits FROM transactions WHERE to_user =
&#391;'))' at line 3

View Replies !
Form Validation For A Simple Contact Us Form
I'm doin a Web Programming Course and we were asked to do a simple contact for. for some reason it's not running. Can someone tell me why? here is the code:

<?php
IF(ISSET($_POST['submit'])){
$NAME = $_POST ['name'];
$EMAIL = $_POST ['email'];
$SUBJECT = $_POST ['_subject'];
$MESSAGE = $_POST ['message'];
include 'config.php'

View Replies !
Form Question - Implement A Simple Form
I'm trying to implement a simple form. I've pretty much been using the format in the PHP book I bought, but everytime I submit this form, it just reloads the form again.

<p>Music Lab Login</p>
<form action="<Full URL of this file>" method="post">
<p>Username:<br />
<input type="text" name="username" size="20" maxlength="20" value="" /></p>
<p>Password:<br />
<input type="password" name="pw" size="20" maxlxength="20" value="" /></p>
<input type="submit" name="submit" value="Login" />
</form>

<?php

if(isset($_POST['submit'])) {
echo "Got it";
}

?>

View Replies !
Simple PHP Class To Convert A HTML File To PDF
I need a simple PHP class to convert a HTML file (with texts and images) to PDF. I'm using php4 and can't use php5 on my server.

View Replies !
Wanted - Simple Section Numbering Prog For HTML Document
I maintain various specs and FAQs in manually edited HTML documents,
and I'd very much like some simple way of automatic section numbering
as in 2.1, 2.1.1, 2.1.2, 2.2 etc, with table of contents generation
plugged into the start of the document so that each section can be
accessed via a link (and also maybe automatic footnote numbering). Code:

View Replies !
Create HTML Page
I would like to make a form that once you insert data into the form,it ll automatically create a html format of the data you entered in a html and save it in a folder! How do i go by doing this?

View Replies !
Create An Html Link
Is it possible to create an html link for in internal *.html file where $filename.html is posted from a form?

View Replies !
Create A New Html File
how to open and edit or add a file but ,I don't know how to create a new ".html" or ".txt" file? I have STFW and STFM but still maybe i'm blind.

View Replies !
Create Html Table
tryin to get a table to add a new td /td for every result from the Db. but can't for life of me figure it out...

the nubers are the results and there are 3 required infos from each entry,(abc)
so if there were 4 results it would have a 4a,4b,4c...

its prob really simple but i cant get it! how would i print it via PHP? Code:

View Replies !
Create HTML Emails
I've been trying to create HTML emails but when i receive the email created by this script the link comes out as text do anyone have any idea why this might be? and what apoach would be best to solve it. Code:

View Replies !
How To Create Html List From Such Array ?
I've got an example array like this:

$myArr = array(
array("jj", "0", "jjj"),
array("ee", "0", "eee"),
array("bb", "ee", "bbb"),
array("ll", "ee", "lll"),
array("ff", "0", "fff"),
)

Where each row is an array with columns: id of list element, id of parent
list element ("0" means main node) and content of the element. So, from my
array I'd like to create a list like this:

<ul>
<li>jjj</li>
<li>eee
<ul>
<li>bbb</li>
<li>eee</li>
</ul>
</li>
<li>fff</li>
<ul>

View Replies !
Create Html Table With Php Result?
I'm looking to display 5 records in one rows, from the database. What i mean is, basically, let's take the "emails" as an example. I have a table with 100s of email
addresses. Now i want to display these email addresses on a html table, but i want to display only 5 email adresses per table row, then the next 5 in the next table row and so
on.

View Replies !
PHP Create HTML Email Inserts '!'s
I'm trying to create an email and when it sends the email, it mostly
works except that there are '!' inserted at some spots. Checking the
html source of the email, looks like they are placed at the end of
long lines. I'm assuming there is some issue with the encoding, but
searching through groups, nothing I've tried has worked. Can someone
let me know if I should be doing something differently with my headers
for an html email? I'll change emails to null@null.com. Thanks!

$headers = "X-Mailer: PHP " . phpversion() . "
";
$headers .= "From: null@null.com
";
$headers .= "Reply-To: null@null.com
";
$headers .= "Content-Type: text/html;
";
$headers .= "charset="iso-8859-1"
";
$headers .= "Content-Transfer-Encoding: 7bit
";

View Replies !
Script To Create Html File
I'm looking for a php script that will look in my images folder and for each image in there, create an html file named <imagename>.html and store it in a folder called "pages". I currently use the code  inserted below that scans my image folder, creates an xml file that contains a list of the images and the my Flash image gallery reads the xml file to create the gallery.

but I would rather do it by the method I'm requesting above and get away from flash. Any ideas? Even if there's a way to modify the code below to do what I want, that would be great. Code:

View Replies !
Combining BBcode To Create One Html Tag
I'm working on some BBCode and I was wondering if it is possible to combine two bbcode tags to create one span tag after the preg_replace e.g. Code:

[font=Arial ][b ][color=red ]Text[/color ][ /b][/font ]

HTML Code:

<span style='font-family:Arial;font-weight:bold;color:red;'>Text</span>

instead of HTML Code:

<span style='font-family:Arial;'><span style='font-weight:bold;'><span style='color:red;'>Text</span></span></span>

Of course I'd need it for multiple instances of nested BBcode tags within the same message.

View Replies !
Create A New .html File On My Server...
i have some data in a variable ($message) that is being emailed with
the php's mail() function (an html email actually)...i'd like to also
take that html data in the $message variable and have my script also
make a new .html (with any random name) file on my server with that
$message data, any easy way to do that?

View Replies !
Simple Form
here's what I am after: a simple form (html) that allows a user to select a file (.txt type), then on submit, reads the file to a variable so I can process the file. Code:

View Replies !
Create HTML File From Mysql Result
I want to create HTML file from Mysql result one row to one HTML file ( below only display ), Code:

View Replies !
A Simple Form Query
Can any help me? What I want to do is simple but I can't find anything to help aside from a little php that doesn't help.

I have a form with three text areas, I would like this form, when submit is clicked, to take the user to an HTML formattable output page of the heading of the text areas and the info the user typed in, a preview page if you will. It will be so the user can print the formatted output and file it in their student logs. Or they can save the html output file.

I found a php script that does output to a php file, with the headings and results, only I don't know how to format the php to accept my external css file.

Any help appreciated, I have a headache from searching for options!

Ellie

Here is an example of what I was doing...Any solution is welcome but for a linus server

<?php
$prefer = $_POST["prefer"];
$develop = $_POST["develop"];
$challenge = $_POST["challenge"];
if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Personal INFO</title>
<link rel="StyleSheet" href="style.css" type="text/css" />

</head>
<body>
<form method="post" action="<?php echo $PHP_SELF;?>">
<p>Which opportunity do you prefer and why?
<textarea rows="5" cols="20" name="prefer" wrap="physical"></textarea>
<br />
How could you use this opportunity to develop yourself?
<textarea rows="5" cols="20" name="develop" wrap="physical"></textarea>
<br />
What might challenge you?
<textarea rows="5" cols="20" name="challenge" wrap="physical"></textarea>
<br />
</p>
<input type="submit" value="submit" name="submit">
</form>

<?
include "<link rel='StyleSheet' href='style.css' type='text/css' />";
} else {
echo "<p>Which opportunity do you prefer and why?</p> ".$prefer." <br />";
echo "Which opportunity do you prefer and why?<br /> ".$develop." <br />";
echo "Which opportunity do you prefer and why?<br /> ".$challenge." <br /></p>";
}
?>

View Replies !
How Do I Make A Simple Form.
how do I make a simple form. for example, index.php asks for first and last name. form.php displays the first and last names entered on index.php. OR, where can I find a good tutorial about using forms in PHP?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved