Jump to content

My File Contact.php " Notice: Undefined index: " can you help?


doughnut

Recommended Posts

Hello :) .

Iam starting my web site noiseweapon.com and i have used this Script for some time now and this is the 1st time i have had this and i got it win i set up my search on my site but win i take out the cig for the search i do not get the Error /  Notice.

 

Can any one help me?, i have add config from search and my Contact file.

 

p/s you can fine any of this on the web.......

 

 

Contact, Error / Notice

Notice: Undefined index: name_maill in /contact.php on line 97

Notice: Undefined index: subject in /contact.php on line 100

Notice: Undefined index: message in /contact.php on line 103

Notice: Undefined index: c_email in /contact.php on line 106

Notice: Undefined index: Send in /contact.php on line 108

 

Contact, CODE

//Name
$name = $_POST['name_maill']; 

// Subject of message
$subject = $_POST['subject']; 

// The Message
$message = $_POST['message']; 

//Email
$c_email = $_POST['c_email'];

if ($_POST['Send']) {

// Strip Html
$name = htmlentities($name); 
$subject = htmlentities($subject); 
$message = htmlentities($message); 

/* Can not do it */

// Check if < or > has been placed in the variables
$bad_content = array('<','>'); 
// if they are swap them with this
$new_content = array(':', ':'); 



$name = str_replace($bad_content, $new_content, $name);

$message = str_replace($bad_content, $new_content, $message);

$subject = str_replace($bad_content, $new_content, $subject);

mail("$email", "$subject", "message from $title contact us has been sent to you: \n Name: $name \n Email: $email \n Message: $message \n") or die

// Send the email
("<p><font color='#FF0000' size='+1' style='text-align:center;'>!!Error Cant Send Email!!</font></p>"); 

echo "<p><font size='+1' style='text-align:center;'>Thankyou $name your message has been sent!</font></p>";
}

 

Search CONFIG

// ***** MySQL *****

// These variables should contain MySQL access information
$src_host     = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'localhost' : 'XXXxxxXXX';
$src_login    = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'root'      : 'XXXxxxXX';
$src_password = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'pass'      : 'XXXxxxXXX';
$src_database = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'phpdevel'  : 'XXXxxxXXX';

// These variables should contain MySQL table names
$src_table_conf  = strpos($_SERVER['SCRIPT_NAME'], 'php-scripts/search-engine/') ? "test_search_engine_conf"  : "search_engine_conf";
$src_table_urls  = strpos($_SERVER['SCRIPT_NAME'], 'php-scripts/search-engine/') ? "test_search_engine_urls"  : "search_engine_urls";
$src_table_index = strpos($_SERVER['SCRIPT_NAME'], 'php-scripts/search-engine/') ? "test_search_engine_index" : "search_engine_index";

// If you set this variable to true, old tables will be removed during setup (BE CAUTIOS)
$src_replace = ($_SERVER['SERVER_NAME'] == 'localhost') || preg_match("/.*php-development\\.ru/iX", $_SERVER['SERVER_NAME']);

// ***** Search Options *****

// This variable should contain the number of results per page
$src_results_per_page = 10;

// These variables should contain the "main content start" and "main content end" markers.
// Search engine will not index content before the start marker and after the end marker.
// This way you can exclude site navigation from search.
// If you don't want to use this feature, assign both variables to the empty string (i.e. "").
$src_text_start = "<!-- search engine: text start -->";
$src_text_end   = "<!-- search engine: text end -->";

// These variable should contain the list of word characters and character encoding
$src_word_chars = 'a-zA-Z0-9';
$src_word_enc   = 'utf-8';

// If set to true, search engine will recognize different word forms.
// For example, if you search for "cat", search engine will also display the pages
// that contain the word "cats", etc.
$src_word_forms = true;

// This variable should contain the list of stop words.
$src_stopwords = array(
  'a', 'about', 'an', 'are', 'as', 'at',
  'be', 'by',
  'com',
  'for', 'from',
  'how',
  'i', 'in', 'is', 'it',
  'of', 'on', 'or',
  'that', 'the', 'this', 'to',
  'was', 'what', 'when', 'where', 'who', 'will', 'with', 'www');


// ***** Initialization ********************************************************

set_time_limit(0);
error_reporting(E_ALL);
ini_set("log_errors",     0);
ini_set("display_errors", 1);

mysql_connect($src_host, $src_login, $src_password);
mysql_select_db($src_database);

include_once dirname(__FILE__) . "/api.php";

$src_conf  = new TSRC_KeyVal();
$src_conf ->init($src_table_conf,  'conf_');

$src_urls  = new TSRC_KeyVal();
$src_urls ->init($src_table_urls,  'urls_');

$src_index = new TSRC_WordId();
$src_index->init($src_table_index, 'index_');

?>

 

??? ??? ??? ??? ???

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.