Hi guys,
I need a script that i can put on my site, what i need is:
I need a user to input there cell / home number, then that file email me that number very simple,
i checked a few tuts on them, but not sure on there security,
I am willing to pay for such a script if one of you guys can make one, its not a complex script so i wouldnt imagine it cost much.
or if you can point me to a script that you may know to be ok, that would work.
Thanks for your help
text script
Started by evertonian7uk, Dec 08 2007 08:53 AM
5 replies to this topic
#1
Posted 08 December 2007 - 08:53 AM
#2
Posted 08 December 2007 - 11:06 AM
So you want something similar to this:
If you want to make sure the number is numeric you could try something like this:
Just a note: I did not test the scripts.
dEcade
<?php
$post = (isset($_POST['submit'])) ? true : false;
if ($post)
{
$cell = $_POST['cell'];
$home = $_POST['home'];
$message = "Cell Number: $cell\n\nHome Phone: $home";
mail('youremail@whatever.com', 'Phone Numbers', $message);
}
else
{
?>
<form method="post" action="THIS PAGE NAME!.php">
Cell:
<br />
<input type="text" name="cell" size="20" />
<br />
<br />
Home Phone:
<br />
<input type="text" name="home" size="20" />
<br />
<br />
<input type="submit" value="Submit" name="submit">
</form>
<?php
}
?>
If you want to make sure the number is numeric you could try something like this:
<?php
$post = (isset($_POST['submit'])) ? true : false;
if ($post)
{
$cell = $_POST['cell'];
$home = $_POST['home'];
$cell = str_replace('-', '', $cell);
$home = str_replace('-', '', $home);
if (!is_numeric($cell) || !is_numeric($home))
{
// Phone number is not numeric so do whatever here.
}
$message = "Cell Number: $cell\n\nHome Phone: $home";
mail('youremail@whatever.com', 'Phone Numbers', $message);
}
else
{
?>
<form method="post" action="THIS PAGE NAME!.php">
Cell:
<br />
<input type="text" name="cell" size="20" />
<br />
<br />
Home Phone:
<br />
<input type="text" name="home" size="20" />
<br />
<br />
<input type="submit" value="Submit" name="submit">
</form>
<?php
}
?>
Just a note: I did not test the scripts.
dEcade
#3
Posted 09 December 2007 - 06:19 AM
script works fine matey, thank you very much for the help, if you want paying PM me your paypal ID 
just another quick question, how would i make the submit button stay on the page the user input the number,
like, when the guy inputs the details and hits submit, how do i make it stay on the same page?
again, thanks for taking the time to help me out.
just another quick question, how would i make the submit button stay on the page the user input the number,
like, when the guy inputs the details and hits submit, how do i make it stay on the same page?
again, thanks for taking the time to help me out.
Edited by evertonian7uk, 09 December 2007 - 08:26 AM.
#4
Posted 09 December 2007 - 10:35 AM
Its all free.
So just to be clear, you want it so when they click submit it will send the stuff but keep them on the form?
So something like:
So just to be clear, you want it so when they click submit it will send the stuff but keep them on the form?
So something like:
<?php
$post = (isset($_POST['submit'])) ? true : false;
if ($post)
{
$cell = $_POST['cell'];
$home = $_POST['home'];
$cell = str_replace('-', '', $cell);
$home = str_replace('-', '', $home);
if (!is_numeric($cell) || !is_numeric($home))
{
// Phone number is not numeric so do whatever here.
}
$message = "Cell Number: $cell\n\nHome Phone: $home";
mail('youremail@whatever.com', 'Phone Numbers', $message);
?>
<form method="post" action="THIS PAGE NAME!.php">
Cell:
<br />
<input type="text" name="cell" size="20" />
<br />
<br />
Home Phone:
<br />
<input type="text" name="home" size="20" />
<br />
<br />
<input type="submit" value="Submit" name="submit">
</form>
<?php
}
else
{
?>
<form method="post" action="THIS PAGE NAME!.php">
Cell:
<br />
<input type="text" name="cell" size="20" />
<br />
<br />
Home Phone:
<br />
<input type="text" name="home" size="20" />
<br />
<br />
<input type="submit" value="Submit" name="submit">
</form>
<?php
}
?>
#5
Posted 10 December 2007 - 10:54 AM
OK now I have a question for you Decade, will this script work with rates also.
(ex:) If I wanted a place (box ) or w/e on my web site that a user ( Customer) could input an Origin and Destination point for a rate($) request and have it sent to say like 4 employees e-mail's. Is that possible and if so would that script work that you listed above , if not can you please show me what I would need to change or do so something like what I'm wanting can be possible?
Thank You in Advance
-Demonixx
(ex:) If I wanted a place (box ) or w/e on my web site that a user ( Customer) could input an Origin and Destination point for a rate($) request and have it sent to say like 4 employees e-mail's. Is that possible and if so would that script work that you listed above , if not can you please show me what I would need to change or do so something like what I'm wanting can be possible?
Thank You in Advance
-Demonixx
#6
Posted 13 December 2007 - 08:42 AM
this will work for you, i changed it around on my site aswell, to fit pretty much what you asked for.
good luck
good luck
<?php
$post = (isset($_POST['submit'])) ? true : false;
if ($post)
{
$origin = $_POST['origin'];
$destination = $_POST['destination'];
$origin = str_replace('-', '', $origin);
$destination = str_replace('-', '', $destination);
if (!is_numeric($cell) || !is_numeric($home))
{
// Phone number is not numeric so do whatever here.
}
$message = "origin: $origin\n\nOrigin: $home";
mail('youremail@whatever.com', 'destination', $message);
}
else
{
?>
<form method="post" action="THIS PAGE NAME!.php">
Origin:
<br />
<input type="text" name="origin" size="20" />
<br />
<br />
Destination:
<br />
<input type="text" name="destination" size="20" />
<br />
<br />
<input type="submit" value="Submit" name="submit">
</form>
<?php
}
?>
Edited by evertonian7uk, 13 December 2007 - 08:43 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
