Creating a Webnote

Soldato
Joined
27 Aug 2004
Posts
17,067
Location
Geordieland
Hi guys, just wondering if i can get a hand with creating a webnote box system. Ive created the form HERE but i havent got a clue how to set up the PHP page it links to :( Ive gave the PHP page read.write permissions etc but i dont know what code i need to use to get it to work.

Just wondering if anyone had any useful guides to setting these things up or if anyone could give me a little help.

Any advice is gratefully appreciated.
 
Last edited:
Soldato
Joined
12 Jun 2005
Posts
5,361
Hi there,

First of all, does your webhost support PHP?

You could try storing the webnotes into a database and reading off the database...I would wait for someone else to suggest something, as there might be a more feasible solution...

Thanks...
 
Soldato
Joined
15 Sep 2003
Posts
9,454
Conrad11 said:
Hi there,

First of all, does your webhost support PHP?

You could try storing the webnotes into a database and reading off the database...I would wait for someone else to suggest something, as there might be a more feasible solution...

Thanks...

Sounds like a good solution to me.

Take a look at http://www.w3schools.com/php/default.asp to start your php knowledge. Also http://www.php.net/ will have some valuable information.
 
Soldato
Joined
12 Jun 2005
Posts
5,361
Hi there,

If you are interested in the Webnote system you may want to have a look at this page for how to implement databases: http://www.freewebmasterhelp.com/tutorials/phpmysql/1

If you want the contact form, then your contact php processing page would be something like this. If you need more help with this I can help on here or you can add me to msn at: ruudbarron [at] hotmail [dot] com.

<?php

$EmailFrom = " from your website";
$EmailTo = "your email";
$Subject = "subject;
$Name = Trim(stripslashes($_POST['Name']));
$Email = Trim(stripslashes($_POST['Email']));
$Comments = Trim(stripslashes($_POST['Message']));

$validationOK=true;
if (Trim($Email)=="") $validationOK=false;
if (Trim($Message)=="") $validationOK=false;
if (!$validationOK) {
echo 'nothing entered in email or message';
exit;
}

$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";

$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

if ($success){
echo 'email sent';
exit;
}
else{
$_SESSION['error'] = 'Contacting Us!';
echo 'problem whilst sending email';
exit;
}
?>

Thanks...
 
Last edited:
Soldato
Joined
15 Dec 2004
Posts
3,819
Stellios said:
That would be even better than i was hoping for if it possible.

I'll send the files to the e-mail address in your trust if that's ok because I can't upload them anywhere at the minute... :o
 
Soldato
OP
Joined
27 Aug 2004
Posts
17,067
Location
Geordieland
Wow, thanks guys :)

I tried both the options given to me and decided to use Triggers as i found i couldnt get Conrads working for some reason :(

A big thank you to all that gave me help, and indeed one of my webspaces will not support PHP it seems, but the other does :)

Anyone wanting to check out the site can do so HERE

Thanks again :D
 
Back
Top Bottom