Use
error_reporting(E_ALL ^ E_NOTICE);
on top of your script (after session_start).
thanks
Use
error_reporting(E_ALL ^ E_NOTICE);
on top of your script (after session_start).
thanks
<?php
session_start();
$ss = $_SESSION['event'];
if ($ss != "eventcal")
{
$type = $_POST['type'];
if($type=="auth")
{
include "checkauth.php";
}else{
include "authlogin.php";
$block = true;
}
}else
{
$block = false;
}
?>
Notice: Undefined index: event in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\HEC_1_2\HEC\authheader.php on line 3
Notice: Undefined index: type in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\HEC_1_2\HEC\authheader.php on line 6
Notice: Undefined variable: xx in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\HEC_1_2\HEC\authlogin.php on line 17
Can anyone tell me how to add events in php calendar ? ineesd to ADD EVENTS
Whats wrong with you???
Use Code Tags...
how to use code tags?
<html>
<head>
<title>Calendar: Add</title>
<META HTTP-EQUIV="refresh" content="1;URL=../../calendar.php">
<LINK rel="stylesheet" type="text/css" name="style" href="../../calendar.css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
function getMaxKey($db)
{
$maxKey = 0;
$sortby = "event_key";
$result = $db->getall();
foreach ($result as $item) {
$key = $item["event_key"];
if ($key > $maxKey) $maxKey = $key;
}
return $maxKey;
}
include ("../../ffdb.inc.php");
$db = new FFDB();
if (!$db->open("../calendar")) {
$schema = array(array("event_key", FFDB_INT, "key"), array("event_name",
FFDB_STRING), array("event_description", FFDB_STRING), array("event_submitted_by",
FFDB_STRING), array("event_month", FFDB_STRING), array("event_day", FFDB_INT),
array("event_year", FFDB_INT));
if (!$db->create("calendar", $schema)) {
echo "Error creating database\n";
return;
}
}
if (!file_exists("key.dat")) {
$newKey = getMaxKey($db);
$newFile = fopen("key.dat", "w") or die("Can't open file");
fwrite($newFile, $newKey);
fclose($newFile);
}
else {
$fileread = fopen("key.dat", "r") or die("Can't open file");
$data = (int)fread($fileread, 10);
fclose($fileread);
$data++;
$fileread = fopen("key.dat", "w") or die("Can't open file");
fwrite($fileread, $data);
fclose($fileread);
}
$event = stripslashes($event);
$description = stripslashes($description);
$submitted = stripslashes($submitted);
$event = htmlentities($event, ENT_QUOTES);
$submitted = htmlentities($submitted, ENT_QUOTES);
$record["event_key"] = $data;
$record["event_name"] = $event;
$record["event_description"] = $description;
$record["event_submitted_by"] = $submitted;
$record["event_month"] = $month;
list($record["event_day"]) = sscanf($day, "%d");
list($record["event_year"]) = sscanf($year, "%d");
echo ("");
{
echo $addedTable;
else
{
echo ("go back and add event");
}
}
?>
</body>
</html>
Parse error: syntax error, unexpected T_ELSE in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\calendar\admin\calAdd.php on line 64
hii
i m designing a php event based calendar
this is my code, can anyone tell me its script code,mine is not working..
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
// Get values from query string
$day = $_GET["day"];
$month = $_GET["month"];
$year = $_GET["year"];
$sel = $_GET["sel"];
$what = $_GET["what"];
if($day == "")
$day = date("j");
if($month == "")
$month = date("m");
if($year == "")
$year = date("Y");
$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;
$numEventsThisMonth = 0;
$hasEvent = false;
$todaysEvents = "";
<table width='350' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td class='head' width='50'>S</td>
<td class='head' width='50'>M</td>
<td class='head' width='50'>T</td>
<td class='head' width='50'>W</td>
<td class='head' width='50'>T</td>
<td class='head' width='50'>F</td>
<td class='head' width='50'>S</td>
</tr>
$numDays = date("t", $currentTimeStamp);
for($i = 1; $i < $numDays+1; $i++, $counter++)
{
$timeStamp = strtotime("$year-$month-$i");
if($i == 1)
{
// Workout when the first day of the month is
$firstDay = date("w", $timeStamp);
for($j = 0; $j < $firstDay; $j++, $counter++)
echo "<td> </td>";
}
if($counter % 7 == 0)
echo "</tr><tr>";
echo "<td width='50'>$I</td>";
if(date("w", $timeStamp) == 0 || date("w", $timeStamp) == 6)
echo "class='weekend'";
else
if($i == date("d") && $month == date("m") && $year == date("Y"))
echo "class='today'";
else
echo "class='normal'";
$monthName = date("F", $currentTimeStamp);
<tr>
<td width='50' colspan='1'>
<input type='button' value=' < ' onClick='goLastMonth(<?php echo $month . ", " . $year; ?>)'> …
Notice: Undefined variable: event in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 46
Notice: Undefined variable: description in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 47
Notice: Undefined variable: submitted in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 48
Notice: Undefined variable: month in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 55
Notice: Undefined variable: day in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 56
Notice: Undefined variable: year in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\admin\calAdd.php on line 57
Fatal error: Invalid string value field during add: event_month in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\ffdb.inc.php on line 487
calladd.php
<html>
<head>
<title>Calendar: Add</title>
<META HTTP-EQUIV="refresh" content="1;URL=../calendar.php">
<LINK rel="stylesheet" type="text/css" name="style" href="../calendar.css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
function getMaxKey($db)
{
$maxKey = 0;
$sortby = "event_key";
$result = $db->getall();
foreach ($result as $item) {
$key = $item["event_key"];
if ($key > $maxKey) $maxKey = $key;
}
return $maxKey;
}
include ("../ffdb.inc.php");
$db = new FFDB();
if (!$db->open("../cal")) {
$schema = array(array("event_key", FFDB_INT, "key"), array("event_name",
FFDB_STRING), array("event_description", FFDB_STRING), array("event_submitted_by",
FFDB_STRING), array("event_month", FFDB_STRING), array("event_day", FFDB_INT),
array("event_year", FFDB_INT));
if (!$db->create("calendar", $schema)) {
echo "Error creating database\n";
return;
}
}
if (!file_exists("key.dat")) {
$newKey = getMaxKey($db);
$newFile = fopen("key.dat", "w") or die("Can't open file");
fwrite($newFile, $newKey);
fclose($newFile);
}
$fileread = fopen("key.dat", "r") or die("Can't open file");
$data = (int)fread($fileread, 10);
fclose($fileread);
$data++;
$fileread = fopen("key.dat", "w") or die("Can't open file");
fwrite($fileread, $data);
fclose($fileread);
$event = stripslashes($event);
$description = stripslashes($description);
$submitted = stripslashes($submitted);
$event = htmlentities($event, ENT_QUOTES);
$submitted = htmlentities($submitted, ENT_QUOTES);
$record["event_key"] = $data;
$record["event_name"] = $event;
$record["event_description"] = $description;
$record["event_submitted_by"] = $submitted;
$record["event_month"] = $month;
list($record["event_day"]) = sscanf($day, "%d");
list($record["event_year"]) = sscanf($year, "%d");
echo ("");
if ($db->add($record)) {
$addedTable = "
<center><font class=\"back\">Record Added: taking you back</font> </center>
<table cellpadding=\"0\" cellspacing=\"2\" border=\"0\" bgcolor=\"#000000\" align=\"center\"><tr><td>
<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CC0000\" align=\"center\">
<tr><td><font class=\"addHead\"><a href=\"cal.php\" class=\"addHead\">Calendar</a></font></TD></tr>
<tr><td>
<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CCCCCC\">
<tr>
<td width=\"150\" align=\"right\" height=\"26\"><font class=\"AddLeft\">Event : </font></td>
<td width=\"350\" height=\"26\"><font class=\"AddRight\">$event</font></td>
</tr>
<tr bgcolor=\"#E3E3E3\">
<td width=\"150\" align=\"right\"><font class=\"AddLeft\">Event Description : </font></td>
<td width=\"350\"><font class=\"AddRight\">$description</font></td>
</tr>
<tr>
<td width=\"150</h5>\" align=\"right\"><font class=\"AddLeft\">Date : </font></td>
<td width=\"350\" ><font class=\"AddRight\">$day $month $year</font></td>
</tr>
<tr bgcolor=\"#E3E3E3\">
<td width=\"150\" align=\"right\"><font class=\"AddLeft\">Submitted By : </font></td>
<td width=\"350\"><font class=\"AddRight\">$submitted</font></td>
</tr>
</table>
</td><tr>
<tr><td align=\"right\"></td></tr>
</table>
</td></tr></table>
";
echo $addedTable;
}
else {
echo ("go back and add event");
}
?>
</body>
</html>
ffdb.inc.php
<?php
define("FFDB_VERSION_MAJOR", 2);
/*!
* @defined FFDB_VERSION_MINOR
* @discussion Minor version of the FFDB package
*/
define("FFDB_VERSION_MINOR", 7);
/*!
* @defined FFDB_VERSION
* @discussion Version of the FFDB package
*/
define("FFDB_VERSION", FFDB_VERSION_MAJOR.".".FFDB_VERSION_MINOR);
/*!
* @defined FFDB_INT
* @discussion Flat File DataBase int type
*/
define("FFDB_INT", 0);
/*!
* @defined FFDB_INT_AUTOINC
* @discussion Flat File DataBase automatically incremented int type
*/
define("FFDB_INT_AUTOINC", 5);
/*!
* @defined FFDB_STRING
* @discussion Flat File DataBase string type
*/
define("FFDB_STRING", 1);
/*!
* @defined FFDB_ARRAY
* @discussion Flat File DataBase array type
*/
define("FFDB_ARRAY", 2);
/*!
* @defined FFDB_FLOAT
* @discussion Flat File DataBase float type
*/
define("FFDB_FLOAT", 3);
/*!
* @defined FFDB_BOOL
* @discussion Flat File DataBase boolean type
*/
define("FFDB_BOOL", 4);
/*!
* @defined FFDB_IFIELD
* @discussion Index field used when returning records. See the
* getbyfield(...), getbyfunction(...) and getall(...) methods.
*/
define("FFDB_IFIELD", "FFDB_IFIELD");
/*!
* @defined FFDB_SIGNATURE
* @discussion Database signature placed at the start of each index file.
* Internal use only.
*/
define("FFDB_SIGNATURE", 0x42444646 /* "FFDB" in hex */);
/*!
* @defined FFDB_INDEX_VERSION_OFFSET
* @discussion Location of the 'version' offset in the FFDB index.
* Internal use only.
*/
define("FFDB_INDEX_VERSION_OFFSET", 4);
/*!
* @defined FFDB_INDEX_RECORDS_OFFSET
* @discussion Location of the 'records count' offset in the FFDB index.
* Internal use only.
*/
define("FFDB_INDEX_RECORDS_OFFSET", 6);
/*!
* @defined FFDB_INDEX_DELETED_OFFSET
* @discussion Location of the 'deleted count' offset in the FFDB index.
* Always the next 'int size' offset after the 'records count' offset.
* Internal use only.
*/
define("FFDB_INDEX_DELETED_OFFSET", FFDB_INDEX_RECORDS_OFFSET+4);
/*!
* @defined FFDB_INDEX_RBLOCK_SIZE
* @discussion Size of the field specifing the size of a record in the index.
* Internal use only.
*/
define("FFDB_INDEX_RBLOCK_SIZE", 4 /* int */);
/*!
* @class FFDB
* @abstract Flat File DataBase Class
* @discussion Implements a flat file database.
*/
class FFDB
{
var $DBHost = "mysql11.streamline.net";
var $DBPort = "3306";
var $DBUser = "highwebco";
var $DBDatabase = "highwebco";
var $DBPassword = "s106251";
var $Persistent = false;
var $fields;
var $autoinc;
var $primary_key;
var $index_start;
/*!
* @function FFDB
* @abstract Constructor
*/
function FFDB()
{
// Disable auto-clean by default
$this->auto_clean = -1;
// Database hasn't been opened yet...
$this->isopen = false;
// Ignore user aborts that might corrupt the database
ignore_user_abort(true);
}
/*!
* @function open
* @abstract Opens the given database
* @param dbname string - The name of the database to open
* @result bool - true if successful, false if failed
*/
function open($dbname)
{
// Close existing databases first
if ($this->isopen)
$this->close();
// Open the database files
$this->data_fp = @fopen($dbname.".dat", "rb+");
if ($this->data_fp === false)
{
// user_error("Cannot open data file: $dbname.dat", E_USER_ERROR);
return false;
}
$this->meta_fp = @fopen($dbname.".met", "rb+");
if (!$this->meta_fp)
{
fclose($this->data_fp);
// user_error("Cannot open meta file: $dbname.met", E_USER_ERROR);
return false;
}
$this->forcelock = 0;
$this->locked = 0;
$this->isopen = true;
$this->dbname = $dbname;
if (!$this->lock_read())
return false;
// Read and verify the signature
$sig = $this->read_int($this->meta_fp);
if ($sig != FFDB_SIGNATURE)
{
$this->unlock();
user_error("Invalid database: $dbname.", E_USER_ERROR);
return false;
}
// Read the version
$ver_major = $this->read_byte($this->meta_fp);
$ver_minor = $this->read_byte($this->meta_fp);
// Make sure we only read databases of the same major version,
// with minor version less or equal to the current.
if ($ver_major != FFDB_VERSION_MAJOR)
{
$this->unlock();
user_error(
"Cannot open database (of version $ver_major.$ver_minor), "
."wrong version.",
E_USER_ERROR
);
return false;
}
if ($ver_minor > FFDB_VERSION_MINOR)
{
$this->unlock();
user_error(
"Cannot open database (of version $ver_major.$ver_minor), "
."wrong version.",
E_USER_ERROR
);
return false;
}
// Read the schema and database statistics from the meta file.
$this->read_schema();
$this->unlock();
return true;
}
/*!
* @function close
* @abstract Closes the currently opened database
*/
function close()
{
if ($this->isopen)
{
@fclose($this->data_fp);
@fclose($this->meta_fp);
$this->isopen = false;
}
}
/*!
* @function drop
* @abstract Closes the current database then deletes it.
* @result bool - true on success
*/
function drop()
{
if (!$this->isopen)
{
user_error("Database not open.", E_USER_ERROR);
return false;
}
$this->close();
@unlink($this->dbname.".dat");
@unlink($this->dbname.".met");
return true;
}
/*!
* @function create
* @abstract Creates a new database
* @param dbname string - name of the database
* @param schema array - name<->type array of fields for table.
* Note that the key cannot be an array or boolean type field.
* The key is given by a third attribute - a string "key".
* @result bool - true if successful, false on failure
*/
function create($dbname, $schema)
{
// Close any existing DB first
if ($this->isopen)
$this->close();
// Find the primary key and do error checking on the schema
$this->fields = array();
$this->autoinc = array();
$this->primary_key = "";
for($i=0; $i<count($schema); ++$i)
{
$field = $schema[$i];
if (!is_array($field))
return false;
$name =
Notice: Undefined variable: sent_month in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\Calendar-php\calendar.php on line 431
<html>
<head>
<title>Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK rel="stylesheet" type="text/css" name="style" href="calendar.css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table cellpadding="0" cellspacing="2" border="0" align="center" bgcolor="#000000"><tr><td>
<table cellpadding="2" cellspacing="0" border="0" align="center" bgcolor="#CC0000">
<tr><td width="200" valign="middle">  </td>
<td width="348" align="center"> </td>
<td width="200" align="right"><A HREF="admin/add.php" class="addEvent">Add Event </a></td>
</tr>
</table>
</td></tr></table><BR><BR>
<?php
// Include the FFDB library
include("ffdb.inc.php");
//open db or create new db
$db = new FFDB();
if (!$db->open("calendar"))
{
// Define the database shema.
// Note that the "last_name" field is our key.
$schema = array(
array("event_key", FFDB_INT, "key"),
array("event_name", FFDB_STRING),
array("event_description", FFDB_STRING),
array("event_submitted_by", FFDB_STRING),
array("event_month", FFDB_STRING),
array("event_day", FFDB_INT),
array("event_year", FFDB_INT)
);
// Try and create it...
if (!$db->create("calendar", $schema))
{
echo "Error creating database\n";
return;
}
}
function today($record)
{ global $event_day;
global $event_month;
global $event_year;
//echo "$event_month $event_day $event_year";
if (($record["event_month"] == $event_month) &&
($record["event_day"] == $event_day) &&
($record["event_year"] == $event_year))
return true;
return false;
}
function show_event($record){
$eventNumber = $record["event_key"];
$eventName = $record["event_name"];
echo "<font class=\"eventLink\">-<a href=\"viewEvent.php?eventNumber=$eventNumber\" class=\"eventLink\">$eventName</a></font> <br>";
}
function getEvents(){
global $db;
//get events for today
$result = $db->getbyfunction("today");
//display events if there are any
if($result != null)
foreach($result as $item)
show_event($item);
}
function days_in_month($_month, $_year)
{
if($_month == 2)
{ return days_in_feb($_year); }
else {
if($_month == 1 || $_month == 3 || $_month == 5 || $_month == 7 || $_month == 8 || $_month == 10 || $_month == 12)
{ return(31); }
else { return(30); }
}
}
function selectMonth($_month){
$selectstart = "
<select name=\"sent_month\"> …
hi
i design a php event calendar
but it showing some error, anyone check it plz..
Parse error: syntax error, unexpected T_ELSE in W:\www\Calendar-php\admin\calAdd.php on line 149
<html>
<head>
<title>Calendar: Add</title>
<META HTTP-EQUIV="refresh" content="1;URL=../calendar.php">
<LINK rel="stylesheet" type="text/css" name="style" href="../calendar.css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
//returns highest key in the database
function getMaxKey($db) {
$maxKey = 0;
$sortby = "event_key";
$result = $db->getall();
foreach($result as $item){
$key = $item["event_key"];
if($key > $maxKey)
$maxKey = $key;
}
return $maxKey;
}
// Include the FFDB library
include("../ffdb.inc.php");
//open db or create new db
$db = new FFDB();
if (!$db->open("../calendar"))
{
// Define the database shema.
// Note that the "last_name" field is our key.
$schema = array(
array("event_key", FFDB_INT, "key"),
array("event_name", FFDB_STRING),
array("event_description", FFDB_STRING),
array("event_submitted_by", FFDB_STRING),
array("event_month", FFDB_STRING),
array("event_day", FFDB_INT),
array("event_year", FFDB_INT)
);
// Try and create it...
if (!$db->create("calendar", $schema))
{
echo "Error creating database\n";
return;
}
}
//if no key file create a new one
if(!file_exists("key.dat"))
{
$newKey = getMaxKey($db);
$newFile = fopen("key.dat", "w") Or die("Can't open file");
fwrite($newFile,$newKey);
fclose($newFile);
}
//add a record
//convert forms to record
$fileread = fopen("key.dat", "r")Or die("Can't open file");
$data = (int) fread($fileread, 10);
fclose($fileread);
$data++;
$fileread = fopen("key.dat", "w") Or die("Can't open file");
fwrite($fileread,$data);
fclose($fileread);
//removes escape slashes
$event = stripslashes($event);
$description = stripslashes($description);
$submitted = stripslashes($submitted);
//add html entities
$event = htmlentities($event,ENT_QUOTES);
$submitted = htmlentities($submitted,ENT_QUOTES);
$record["event_key"] = $data;
$record["event_name"] = $event;
$record["event_description"] = $description;
$record["event_submitted_by"] = $submitted;
$record["event_month"] = $month;
list($record["event_day"]) = sscanf($day, "%d"); // string -> int
list($record["event_year"]) = …
that above code doesnot working,,,
tell me any simple method so that it will display Your details , your business title ....
<?php
$body = "";
foreach($_POST as $key => $value) {
$body .= "$key : $value \n";
}
mail("yourmail.com", "Enquiry", $body, "From: [email]webmaster@yahoo.co.uk[/email]");
?>
Thanks - Email Send - Done
this is my final script that get information from all 5 html forms
where i put $mesaage?
u know i m using 5 html forms so i want when i will get the output of 5 pages on my email how can i identify which ifromation is realted to which form thats y i need to display a title that will breakup the pages like :-
YOUR DETAILS(title)
title : MR
name :
lname :
address : LONDON
pin :
country : UK
contact :
email :
YOUR BUSINESS(title)
business :
type :
product :
staff : UJFYHDD
checkbox : a
checkbox2 :
checkbox3 : c
checkbox4 :
checkbox5 : e
YOUR WEBSITE(title)
radio : 1
color : 1
webpage : NA
hosting : 1
account :
web1 : HTTP://WWW.YAHOO.COM
like :
web2 : HTTP://WWW.YAHOO.COM
like2 :
brand : 1
images : 1
text : 1
lang : 0
want to display like above..any idea?
hi...
can anyone tell me how to print title on every page.. i want to recieve a title of everypage but only in email that titile only will display on my email that i will get not anywhere else....
Notice: Undefined variable: subject in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16
Notice: Undefined variable: message in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16
Notice: Undefined variable: from in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16
Warning: mail() [function.mail]: SMTP server response: 554 <you@email.com>: Recipient address rejected: Relay access denied in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16
Notice: Undefined variable: subject in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20
Notice: Undefined variable: message in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20
Notice: Undefined variable: from in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20
Warning: mail() [function.mail]: SMTP server response: 554 <you@email.com>: Recipient address rejected: Relay access denied in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20
Thanks - Email Send - Done
if(md5($verif_box).'a4xn' == $_COOKIE['tntcon']){
// if verification code was correct send the message and show this page
mail("you@email.com", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
// delete the cookie so it cannot sent again by refreshing this page
setcookie('tntcon','');
} else {
// if verification code was incorrect then return to contact page and show error
header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true");
exit;
}
it showing again and agian same page ...refresh the page ans again same page..
now i need captach validation... how to add it?
hey i solved it i put the same value for all radio buttons thats y me silly girl.
thanks for ur help....
hey these above errors are radio buttons how to display it?
i use this
<?php error_reporting(E_ALL^E_NOTICE);?>
ans how to use $_SESSION ?
this is my 3.php file
<?php error_reporting(E_ALL^E_NOTICE);?>
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Do you currently have a website?<br></span>
<br>
<input type='hidden' name='title' value='<?php echo $_POST['title']?>' />
<input type='hidden' name='name' value='<?php echo $_POST['name']?>' />
<input type='hidden' name='lname' value='<?php echo $_POST['lname']?>' />
<input type='hidden' name='address' value='<?php echo $_POST['address']?>' />
<input type='hidden' name='pin' value='<?php echo $_POST['pin']?>' />
<input type='hidden' name='country' value='<?php echo $_POST['country']?>' />
<input type='hidden' name='contact' value='<?php echo $_POST['contact']?>' />
<input type='hidden' name='email' value='<?php echo $_POST['email']?>' />
<input type='hidden' name='business' value='<?php echo $_POST['business']?>' />
<input type='hidden' name='type' value='<?php echo $_POST['type']?>' />
<input type='hidden' name='product' value='<?php echo $_POST['product']?>' />
<input type='hidden' name='staff' value='<?php echo $_POST['staff']?>' />
<input type='hidden' name='checkbox' value='<?php echo $_POST['checkbox']?>' />
<input type='hidden' name='checkbox2' value='<?php echo $_POST['checkbox2']?>' />
<input type='hidden' name='checkbox3' value='<?php echo $_POST['checkbox3']?>' />
<input type='hidden' name='checkbox4' value='<?php echo $_POST['checkbox4']?>' />
<input type='hidden' name='checkbox5' value='<?php echo $_POST['checkbox5']?>' />
<input type="radio" name="radio" value="1">yes - If 'yes', please specify website address<br>
<input name="website" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large">
<label>
<input type="radio" name="radio" value="0"> no - If 'no', what web address would you like?<br>
<span class="eg"><em>e.g www.limoservices.co.uk</em> </span><span class="large"><BR>
<input name="no" type="text" id="textfield" />
<br>
<br>
How webpages are required?<br>
<label><input type="radio" name="color" value="1" >1<br>
<input type="radio" name="color" value="1">1-5<br>
<input type="radio" name="color" value="1">5-25<br>
<input type="radio" name="color" value="1"> large database site with 100's of pages<br>
<input type="radio" name="color" value="1"> not sure <br>
<br>
What webpages do you want on your website? <BR>
(e.g. galleries, about us, product, services , enquiry form, documents downloads, video etc.) <br>
<textarea name="webpage" id="textarea" …
ohhkk..
but i got this output now have a look..
title :
name :
lname :
address :
pin :
country :
contact :
email :
business :
type :
product :
staff :
checkbox : <br />
<b>Notice</b>: Undefined index: checkbox in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>76</b><br />
checkbox2 : <br />
<b>Notice</b>: Undefined index: checkbox2 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>77</b><br />
checkbox3 : <br />
<b>Notice</b>: Undefined index: checkbox3 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>78</b><br />
checkbox4 : <br />
<b>Notice</b>: Undefined index: checkbox4 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>79</b><br />
checkbox5 : <br />
<b>Notice</b>: Undefined index: checkbox5 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>80</b><br />
radio : <br />
<b>Notice</b>: Undefined index: radio in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\4.php</b> on line <b>96</b><br />
color : <br />
<b>Notice</b>: Undefined index: color in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\4.php</b> on line <b>97</b><br />
webpage :
hosting : <br />
<b>Notice</b>: Undefined index: hosting in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\4.php</b> on line <b>99</b><br />
account :
web1 :
like :
web2 :
like2 :
brand : <br />
<b>Notice</b>: Undefined index: brand in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\4.php</b> on line <b>105</b><br />
images : <br />
<b>Notice</b>: Undefined index: images in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\4.php</b> on line <b>106</b><br />
text : <br />
i did update it showing this
Notice: Use of undefined constant E_ALLL - assumed 'E_ALLL' in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\2.php on line 57
b>Notice</b>: Undefined index: checkbox2 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>76</b><br />
checkbox3 : <br />
<b>Notice</b>: Undefined index: checkbox3 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>77</b><br />
checkbox4 : <br />
<b>Notice</b>: Undefined index: checkbox4 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>78</b><br />
checkbox5 : <br />
<b>Notice</b>: Undefined index: checkbox5 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>79</b><br />
how to solve it?
field_forwarder()
anyone know about this
thanks, please tell me why its not showing the output we fill in text boxes it only showing boxes name...
i add
<input type='hidden' name='title' value='<?php echo $_POST['title']?>' />
<input type='hidden' name='name' value='<?php $_POST['name']?>' />
<input type='hidden' name='lname' value='<?php $_POST['lname']?>' />
<input type='hidden' name='address' value='<?php $_POST['address']?>' />
<input type='hidden' name='pin' value='<?php $_POST['pin']?>' />
<input type='hidden' name='country' value='<?php $_POST['country']?>' />
<input type='hidden' name='contact' value='<?php $_POST['contact']?>' />
<input type='hidden' name='email' value='<?php $_POST['email']?>' />
<input type='hidden' name='title' value='<?php echo $_POST['title']?>' />
on all form pages so that it can show the all forms output...
hey i did post <?php error_reporting(E_ALLL^E_NOTICE); ?>
this on my pages but i got these notice again on my email...
hi carn, i add hideen input field and now it showing all page output
but it showing only names the text i fill in the fields nt not showing :-(
<input type="checkbox" name="camera" id="checkbox" value="1">
</label>
Live video cameras <br>
<label>
<input type="checkbox" name="contact" id="checkbox2" value="2">
</label>
Contact form <br>
<label>
<input type="checkbox" name="video" id="checkbox3" value="3">
</label>
Video clips <BR>
<label>
<input type="checkbox" name="guestbook" id="checkbox4" value="4">
</label>
Guestbook<br>
<label>
<input type="checkbox" name="news" id="checkbox5" value="5">
</label>
News alerts <br>
<label>
<input type="checkbox" name="dynamic" id="checkbox6" value="6">
</label>
Dynamic picture galleries <br>
<label>
<input type="checkbox" name="blog" id="checkbox7" value="7">
</label>
Blog<br>
<label>
<input type="checkbox" name="feedback" id="checkbox8" value="8">
</label>
Website feedback form <br>
<label>
<input type="checkbox" name="viatualtours" id="checkbox9" checked="checked" value="9">
</label>
Virtual tours <br>
i want to put some checkboxes but we i get mail it showing that
<b>Notice</b>: Undefined index: camera in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>92</b><br />
video : <br />
<b>Notice</b>: Undefined index: video in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>94</b><br />
guestbook : <br />
<b>Notice</b>: Undefined index: guestbook in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>95</b><br />
news : <br />
<b>Notice</b>: Undefined index: news in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>96</b><br />
dynamic : <br />
<b>Notice</b>: Undefined index: dynamic in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>97</b><br />
blog : <br />
<b>Notice</b>: Undefined index: blog in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>98</b><br />
feedback : <br />
<b>Notice</b>: Undefined index: feedback in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>99</b><br />
virtualtours : <br />
<b>Notice</b>: Undefined index: virtualtours in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>100</b><br />
can anyone know about it?
cwarn23 i did update u told me but nothing it only showing 5th page form output not others...
it will not show all html forms output....
i dnt want to merge on a big file, any other solution please....
<script language="javascript">
function funAgree(){
document.form1.action="";
}
function funDisagree(){
document.form1.action="2.php";
}
</script><img src="images/detail.jpg" alt="" /></td>
<td width="435"><form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Title(eg.Mr,Mrs,Dr)<br />
</span>
<input name="title" type="text" id="textfield" />
<br>
</label>
<br>
<span class="large">First name *<br />
</span>
<input name="name" type="text" id="textfield2" />
<span class="small">
</label>
(required)</span><br>
<br>
<span class="large">Last name<br />
</span>
<input name="lname" type="text" id="textfield3" />
<br>
<span class="large"> <br>
Address</span><br />
<label>
<textarea name="address" id="textarea" ></textarea>
</label>
<span class="large">
</label>
<br>
<br>
<span class="large">PIN / Post Code</span><br />
<input name="pin" type="text" id="textfield" />
<br>
<br>
<span class="large">Country</span><br />
<input name="country" type="text" id="textfield" />
<br>
<br>
<span class="large"></span> <span class="large"></span> Contact No *
<label> </label>
</span>
<label> <br />
<input name="contact" type="text" id="textfield5" />
</label>
<span class="small">(required)</span><span class="large"><br>
<br>
Email Address *<br />
<label> </label>
</span>
<label>
<input name="email" type="text" id="textfield" >
</label>
<span class="small">(required)</span><br>
<div align="right"><br>
<br>
<label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</label>
</label>
</div>
</form>
this is the first contact page
<script language="javascript">
function funAgree(){
document.form1.action="requirements-form.php";
}
function funDisagree(){
document.form1.action="3.php";
}
</script>
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Business name</span>
<input name="business" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large"> <br>
What is the nature of your business ?</span>
<label>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
</label>
<br>
<span class="large">What age group are your products aimed towards?
(e.g. 25-35yrs)</span>
<input name="product" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<br>
<span class="large">Number of staff within your organisation </span>
<input name="staff" type="text" id="textfield" />
<br>
<br>
<span class="large">What are your objectives for a …
<script language="javascript">
function funAgree(){
document.form1.action="";
}
function funDisagree(){
document.form1.action="2.php";
}
</script><img src="images/detail.jpg" alt="" /></td>
<td width="435"><form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Title(eg.Mr,Mrs,Dr)<br />
</span>
<input name="title" type="text" id="textfield" />
<br>
</label>
<br>
<span class="large">First name *<br />
</span>
<input name="name" type="text" id="textfield2" />
<span class="small">
</label>
(required)</span><br>
<br>
<span class="large">Last name<br />
</span>
<input name="lname" type="text" id="textfield3" />
<br>
<span class="large"> <br>
Address</span><br />
<label>
<textarea name="address" id="textarea" ></textarea>
</label>
<span class="large">
</label>
<br>
<br>
<span class="large">PIN / Post Code</span><br />
<input name="pin" type="text" id="textfield" />
<br>
<br>
<span class="large">Country</span><br />
<input name="country" type="text" id="textfield" />
<br>
<br>
<span class="large"></span> <span class="large"></span> Contact No *
<label> </label>
</span>
<label> <br />
<input name="contact" type="text" id="textfield5" />
</label>
<span class="small">(required)</span><span class="large"><br>
<br>
Email Address *<br />
<label> </label>
</span>
<label>
<input name="email" type="text" id="textfield" >
</label>
<span class="small">(required)</span><br>
<div align="right"><br>
<br>
<label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</label>
</label>
</div>
</form>
this is the first contact page
<script language="javascript">
function funAgree(){
document.form1.action="requirements-form.php";
}
function funDisagree(){
document.form1.action="3.php";
}
</script>
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Business name</span>
<input name="business" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large"> <br>
What is the nature of your business ?</span>
<label>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
</label>
<br>
<span class="large">What age group are your products aimed towards?
(e.g. 25-35yrs)</span>
<input name="product" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<br>
<span class="large">Number of staff within your organisation </span>
<input name="staff" type="text" id="textfield" />
<br>
<br>
<span class="large">What are your objectives for a …
the email is submit bt output is not correct, i need all pages output..
:-(
<script language="javascript">
function funAgree(){
document.form1.action="";
}
function funDisagree(){
document.form1.action="2.php";
}
</script><img src="images/detail.jpg" alt="" /></td>
<td width="435"><form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Title(eg.Mr,Mrs,Dr)<br />
</span>
<input name="title" type="text" id="textfield" />
<br>
</label>
<br>
<span class="large">First name *<br />
</span>
<input name="name" type="text" id="textfield2" />
<span class="small">
</label>
(required)</span><br>
<br>
<span class="large">Last name<br />
</span>
<input name="lname" type="text" id="textfield3" />
<br>
<span class="large"> <br>
Address</span><br />
<label>
<textarea name="address" id="textarea" ></textarea>
</label>
<span class="large">
</label>
<br>
<br>
<span class="large">PIN / Post Code</span><br />
<input name="pin" type="text" id="textfield" />
<br>
<br>
<span class="large">Country</span><br />
<input name="country" type="text" id="textfield" />
<br>
<br>
<span class="large"></span> <span class="large"></span> Contact No *
<label> </label>
</span>
<label> <br />
<input name="contact" type="text" id="textfield5" />
</label>
<span class="small">(required)</span><span class="large"><br>
<br>
Email Address *<br />
<label> </label>
</span>
<label>
<input name="email" type="text" id="textfield" >
</label>
<span class="small">(required)</span><br>
<div align="right"><br>
<br>
<label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</label>
</label>
</div>
</form>
this is the first contact page
<script language="javascript">
function funAgree(){
document.form1.action="requirements-form.php";
}
function funDisagree(){
document.form1.action="3.php";
}
</script>
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Business name</span>
<input name="business" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large"> <br>
What is the nature of your business ?</span>
<label>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
</label>
<br>
<span class="large">What age group are your products aimed towards?
(e.g. 25-35yrs)</span>
<input name="product" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<br>
<span class="large">Number of staff within your organisation </span>
<input name="staff" type="text" id="textfield" />
<br>
<br>
<span class="large">What are your objectives for a …
<?php
$body = "";
foreach($_POST as $key => $value) {
$body .= "$key : $value \n";
}
mail("your-email", "Web site comments", $body, "From: [email]webmaster@yahoo.co.uk[/email]");
?>
Thanks - Email Send - Done
my contact form consist 5 pages but the above code showing output only 5th page , can anyone tell me why it is nt showing other pages output...
hey i tried this now showing this error
Notice: Undefined index: submit in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 14
hey i tried this now showing this error
Notice: Undefined index: submit in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 14
can u send me contact form script?
Parse error: syntax error, unexpected $end in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 60
Parse error: syntax error, unexpected $end in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 121
i cahnged my code to ur code showing the above error....:-(
Hi ..
you have to close one if condition at last..
}
i did bt nothing happened.. same error