My client recently requested the ability to capture email addressed of visitors to their web site. Is this even possible? If so can it be done with PHP? If not what script would you recommend? Any direction would be greatly appreciated.
Thanks.
My client recently requested the ability to capture email addressed of visitors to their web site. Is this even possible? If so can it be done with Javascript? If not what script would you recommend? Any direction would be greatly appreciated.
Thanks.
I'm sure this is not the best way to accomplish this but here you go.
// explode my date into an array to separate it into variables.
$mydate = explode('-',$rec['showdate']);
// separate out the components assuming format is YYYY-MM-DD
$y = $mydate[0]; // year is first
$m =...
You can use a while statement to loop through the email addresses and send out mail.
$body = $_POST['body']; // text you typed into the form
while ($rec=mysql_fetch_assoc($result)) {
mail($rec['emailaddress'],$subject,$body,$from);
}
Just a thought.
Have you tried assigning the post variable to a variable then checking it against the string?
$yv = trim($_POST['yourvar']);
if ($yv == 'test')
{
echo 'true';
} else {
echo "Variable yv is $yv";
}
What do you get?
Can anyone tell me how to validate a phone number entered by our form users? I want to verify the number is in the format 999-999-9999 and digits not characters are used. For example, AAA-ZZZ-1111.
Help!
Let's try to debug this with a couple of echo statements. Also there are too many ; in the UPDATE SQL statement. Try this code. Let me know what happens.
if (isset($_POST['save'])) { // save button was clicked
//Validate the data in your form here.
//Set your select statement based...
Try changing echo statement
echo '<img src="new/'.$picture.'" width=409 height=293 style="margin-left: 87px">';
or
use print
print '<img src="new/' . rawurlencode ($line) . '">';
Let me know how it turns out.
I'm sure there is more than one way to do this, but this is how I do it. I use the same page to list, edit or add, but I've remove the add portion. Hope it helps.
function display_list()
{
global $message;
$sql = "Select saleid, title, price from yourtable order by title";
$result =...
Are you using a database for the users that are not banned? If so create a banned flag and activate it instead of using the .txt folder to ban members. It would be more secure.
Just a thought.
What about .htaccess and redirecting? I don't know much about them but I've heard people say they use it to protect there stuff. Try doing a search on this or the Apache forum for more info.
Thanks for the advice. I had an echo at the very top of my code. I did a search for header errors before posting. None of them worked.
Thanks for this link it was very informative.
I am receiving this error when I try to redirect to another page in my web site.
Cannot modify header information - headers already sent by
I've identify that the problem is with this code.
if (!isset($_SESSION['admin']) || $_SESSION['admin'] != true) {
header ("Location...
I am unclear of what you are trying to accomplish.
Are you trying to split the string at the 20th character, add the image string to the end of the first part, then reconnect the two string back together again?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.