cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I would say it is most likely to be an IE bug where the page with the cookie headers does not apply those cookie headers untill the page has been loaded a second time and that is why when you hit refresh those cookie headers suddenly come into effect. The reason why that bug would exist is that cookies are usually used for more than one page so probably find in Microsofts opinion, you don't need to use the cookie on the first page. Infact Micrsoft is trying to introduce a system where there are no such thing as cookies to protect personal data. That's why I prefer to use server side cookies.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

All that I have manage to piece together is the following:

[mail function]
; For Win32 only.
SMTP = smpt.gmail.com
smtp_port = 465
;default 25

; For Win32 only.
;place below your gmail address
sendmail_from = username@gmail.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "\xampp\sendmail\sendmail.exe -t"
sendmail_path = "\xampp\sendmail\sendmail.exe"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

But even with the above gmail settings there must be something that needs adding because last time I tried authentication failed meaning it could not log into the gmail server. Perhaps somehow a password needs adding.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It appears in your script that there isn't a valid email. That is one thing that can cause an email delivery to fail. Also as for the php.ini file, it isn't that easy to configure. The php.ini file is driving me crazy to get my localhost php email function working. From what I have read, you need to configure the following lines of the php.ini file:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

And I think there are 2 ways to setup the delivery system. You can install/use a mail server that is on the same server as this php.ini file or you can use a remote mail server such as gmail to send the mail.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well in some editors, there may be a binary string or something like 10011010 at the beginning of the file which the program uses as some sort of identity but can cause errors when using the file on the server. But notepad is a program that you can check if this is the case because you will actually see the binary data at the beginning as converted symbols. Is that description ok?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Again you need the following at the top of your page:

error_reporting(E_ALL ^ E_NOTICE);

And also make sure there is a valid email address in the email function.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

shouldn't your code be like this:

if(isset($_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','',time()-1800);
} 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;
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Whats a captach validation

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I remember reading a long time ago that some editors append their own invisible text before and after the text file. So have you tried using notepad to check this.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I know this sounds ugly/old but what about if each select box was in an iframe and you just set the form target to the next iframe. So the page it redirects to will just contain the processor and the new menu. That will prevent the whole page from refreshing. Other than that you could use the script I gave you earlier that would allow for one menu to make another.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Did you set the below code because it doesn't look like it:

error_reporting(E_ALL ^ E_NOTICE);

Also did you use the $_SESSION array to retrieve the values?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Make sure there are no spaces or new lines before the php opening tag <?
Sometimes there may be something before that opening tag that outputs to the browser which is causing that error.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps it takes time for the cookie to be set in IE or that an additional page load (any page on the site) may be needed.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

oops, I had an extra L in the code. It should be:
error_reporting(E_ALL^E_NOTICE);

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try making a html file with the following html code as a test.

<form name='tc_slot_form' method='get'>
<select onchange="document.forms['tc_slot_form'].submit();" name="tc_id">
<option value=1>test
<option value=2>test2
</select></form>

Then when you load that html file and select an option from the menu, does the url then have a variable in it (example: tc_id=2) or does it just report the error. If it just reports an error then it's probably because of something like activex being disabled or something like that.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I don't know how many times this has been posted on this topic but put at the top of all your pages the following code:

error_reporting(E_ALLL^E_NOTICE);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I believe in creation. Simply put, you don't come across a cabin in the woods and think, "wow, it must have built itself!" (Same fits a well designed PC...like mine! hehe)

Well from my understanding of evolution it is about the development of living organisms and I wouldn't call a PC or a cabin a living organism. There for evolution wins again.

You will probably find that the origin of species is largley impaction on what happened during the time we know as the big bang. The beginning of the universe when planets suddenly came into existance probably from something in the parallel universe going terribly wrong.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I spot a php bug in there and you also did the onchange event wrong. So the code should be as follows:

<table align="center" border="0" cellspacing="1" cellpadding="0">

 <form name="tc_slot_form" method="POST" action="tc_slot1.php">
 <font face='verdana' size='2'>
  <tr>
    <td width="129"></td>
    <td colspan="2" valign="middle"></td>
  </tr>
  <tr>
    <td></td>
    <td colspan="2" valign="middle"></td>
  </tr>
  <tr>
    <td ><div align="left">Test Center ID: </div></td>
    <td colspan="2" valign="middle"><label>
      <select onchange="document.forms['tc_slot_form'].submit();" name="tc_id">
	  <?php
	  	$sql_tc_id="select tc_id from tc_details0709";
		
		$result_tc_id=mysql_query($sql_tc_id);
		if(!$result_tc_id || mysql_num_rows($result_tc_id)==0)
		{
			echo("Error retrieving from database !!!");
			exit();
		}
	   while($row_id = mysql_fetch_array($result_tc_id))
		{
			$tc_id_val = $row_id['tc_id'];
			echo "<option value=$tc_id_val>$tc_id_val</option>";
		}
	  	if (isset($_POST['tc_id']))
		{
			$result=mysql_query("SELECT * FROM tc_details0709 WHERE tc_id='".mysql_real_escape_string($_POST['tc_id'])."'");
			$row=mysql_fetch_array($result);
		}		
		?>

     </select>
    </label>
      <label>
      <input type="submit" name="Submit" value="get values" />
      </label>
      <br/>
        <label></label>
       <label></label>
      <br/></td>
  </tr>
  <tr>
    <td></td>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td><div align="left">Test Center City: </div></td>
	<td colspan="2" valign="middle"><br/>
      <input name="tc_city" type="text" size="20" readonly="true" value="<?php echo $row['tc_city'];?>"><br></td>
  </tr>
  <tr>
    <td></td>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td ><div align="left">Test Center Address:</div></td>
    <td colspan="2"><br/>
        <textarea name="tc_addr" cols="60" rows="3" readonly="readonly" ><?php echo $row['tc_addr']; ?></textarea><br /></td>
  </tr>
  
  <tr>
    <td colspan="3"></td>
  </tr>
  <tr>
    <td><div align="left">Time Slot: </div></td>
    <td colspan="2" valign="middle"><br/>
        <input name="tc_time_slot" type="text" size="45" /> 
        (eg. 10:00 am to 11:00 am) </td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
     
        
        <p align="center">&nbsp;</p>		</td>
    <td width="336"><p align="center"><input type="submit" value="Submit" name="submit" /></p></td>
    <td width="136">&nbsp;</td>
  </tr>
  </font>
  <br/>
 <tr><td colspan="3"><div align="center"></div>
    <font size="2" face="verdana">
      <?php
		if($submit)
		{
			$sql_count="select count(*) as tot_time_slot from tc_time_slot0709";
			$result_get_count=mysql_query($sql_count);
			if(!$result_get_count)
			{
				echo("Error retrieving from database !!!");
				exit();
			}
			if($row_count = mysql_fetch_array($result_get_count))
			{
				$app_no = $row_count['tot_time_slot'];
			}
			$allo_id_no = 10 + …
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try adding the following to your form and the select objects.

<form name='forma1'>
<select onChange="document.forms['forma1'].submit();">

With the name in the form and that onChange event it will make the form submit when the select value changes.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this:

<input type='hidden' name='title' value='<?php echo $_SESSION['title']; ?>' /> 
<input type='hidden' name='name' value='<?php echo $_SESSION['name']; ?>' /> 
<input type='hidden' name='lname' value='<?php echo $_SESSION['lname']; ?>' /> 
<input type='hidden' name='address' value='<?php echo $_SESSION['address']; ?>' />
<input type='hidden' name='pin' value='<?php echo $_SESSION['pin']; ?>' /> 
<input type='hidden' name='country' value='<?php echo $_SESSION['country']; ?>' /> 
<input type='hidden' name='contact' value='<?php echo $_SESSION['contact']; ?>' /> 
<input type='hidden' name='email' value='<?php echo $_SESSION['email']; ?>' /> 
<input type='hidden' name='title' value='<?php echo $_SESSION['title']; ?>' />

The reason why I used session is because in the foreach loop I gave you earlier it converts all posts to sessions when can be passed between multiple pages.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Mysql tables or html tables. Assuming mysql tables, you would do very much like post except you use $_SESSION abbreviation instead of $_POST. So below is an example:

mysql_query("INSERT INTO `table` SET `column1`='".mysql_real_escape_string($_SESSION['person'])."', `column2`='".mysql_real_escape_string($_SESSION['age'])."' `column3`='".mysql_real_escape_string($_SESSION['gender'])."'") or die(mysql_error());

But you will need to adjust the session array accordingly to what the names of your html input fields were.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

HI...
this ia not an error...but, if u can replace all the above notices..
you have to put some code at the top of ur php page....

<?php error_reporting(E_ALLL^E_NOTICE); ?>

yesterday somebody told about this one...try to do it..

lol, I did it again. We both posted at the same time.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

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?

Those errors aren't that important and are just notices. They can be turned off by placing the following code at the top of your page.

error_reporting(E_ALL ^ E_NOTICE);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Still no one has come up with a single mysq_num_rows function? :(

What do you meen. I just did in my previous post. And it is essensial to have the mysql query text in the function because the SELECT and SHOW query's need the mysql_num_rows() function while all other query's need the mysql_affected_rows() function. And the only way to determin which one needs to be used is to see what operator was used in the original mysql query text.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The explode function basically just splits the string where certain character appear and in this case I chose to split wherever the occurance of &content= appears. So if you have another occurance of &content= then it will split it again. But if you want a totally different set of characters to be split then you would use preg_split like the following:

$d=preg_split('/(\&content\=|\&value3\=|\&value4\=)/i',$_post['data']);

echo $d[0];
echo "<hr>";
echo $d[1];
echo "<hr>";
echo $d[2];
echo "<hr>";
echo $d[3];
echo "<hr>";
echo $d[4];

Also with preg_split you can make it case-insensitive like I did above.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well $keyzz in the foreach loop contains the data between the post brackets [] which is then used to place between the session brackets.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

cwarn23 i did update u told me but nothing it only showing 5th page form output not others...

I just tested it and it works for me so your probably not retrieving the values properly. I shall draw a diagram for you and below is an example of 4 pages with 3 forms and the last page will display the results.
page1.php

<?
echo "<form method='post' action='page2.php'>
<input type='text' value='test' name='testvar'>
<input type='submit' value='continue'></form>";
?>

page2.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
echo "<form method='post' action='page3.php'>
<input type='text' value='100' name='number'>
<input type='submit' value='continue'></form>";
?>

page3.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
echo "<form method='post' action='page4.php'>
<input type='text' value='value' name='last'>
<input type='submit' value='continue'></form>";
?>

page4.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
foreach($_SESSION AS $key => $val) {
echo '<b>'.$key.'</b> = '.$val.'<br>';
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Simply use the following:

$d=explode('&content=',$_post['data']);

echo $d[0];
echo "<hr>";
echo $d[1];
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Then when one file posts to another, include the following code and will convert the $_POST to $_SESSION. But be sure to put session_start(); at the top of your pages.

foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}

So when you submit the last page, you can then refer to all the previous posts as sessions.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try something like the following:

<?
if (isset($_POST['tc_id'])) {
$result=mysql_query("SELECT * FROM `table` WHERE `column`='".mysql_real_escape_string($_POST['tc_id'])."'");
$row=mysql_fetch_array($result);
echo "<input type='text' value='".$row['column']."'><br>";
echo "<input type='text' value='".$row['column1']."'>";
}
?>
<select name='tc_id'>
Your existing select box here...
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It is because you are using multiple html forms and you can only submit the form which javascript specifies or the form the the submit button is inside. So you will need to either merge all the forms to one big form or submit the forms one at a time.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I think rohnni just spammed because there is a thread about what rohnni just posted at http://www.daniweb.com/forums/thread178810.html
Edit:
@ rohnni
Shouldn't you keep your php problem within your topic.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This topic really belongs in the Javascript forum but don't double post thought. Just remember that for next time.

As for the javascript problem, it is Internet Explorer with the bug and not your script. This is because Internet Explorer has its own way of dealing with Javascript. To solve this problem the best way is to write 2 scripts. One for Internet Explorer and one for every other browser. So to merge the two, simply place one in a if function and the other in the else for the browser check. Below is an example:

<script type="text/javascript">
var browser=navigator.appName;
if (browser=='Microsoft Internet Explorer' || browser=='MS Internet Explorer' || browser=='Internet Explorer') {

//internet explorer script

} else {

//other browsers script

}
</script>

And just place the 2 scripts where the comments are. So your current script would go where the second/last comment is. And if you want help as to how your script needs to be changed then post your script so we can see what needs changing.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So do i need to put any id number or change any code inside my menu html code part?? like mark some special number there??
Thanks.

Although I don't 100% understand that (slightly fragmented), besically to use my example script, place the each possible second menu where the comments are. And as for the id number, the if statment id number needs to match the id number to gets put into the url bar which if you don't change I have allready done.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Turns out in the days of the first "super computers" some mathematicians determined if a "hacker" could have full access of the computer, every 30 days or so, they probability wise would generate a successful login attempt.

Hence they set forward to make users change their passwords every 30 days...

alright back on topic.

That will soon change in year 2011. IBM will be releasing a supercomputer the size of a large house with 20 petaflops, 1.6 million processors, 1.6 TB of memory with Linux. Check out the article at http://www.pcworld.com/article/159150/ibm_readies_monster_supercomputer.html I wonder how this new supercomputer would work on my new computer games. It is said that it will be 20 times faster than any supercomputer that exists today. That would mean instead of taking 31 days to find the correct password it would only take 2 days. What would the world do without supercomputers.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you want it so that when the above menu is submitted then another menu will appear then try the following:

<form action="index.php" method=GET name=chcat >
               
 <select name=id onChange="document.forms['chcat'].submit();">
 <option value=0>All</option>
 <option value=2>Pizza</option>  
 <option value=4>Special Dinners</option>  
 <option value=5>Side Orders</option>  
 <option value=6>Salads</option> 
 <option value=7>Spaghetti or Ziti</option> 
 <option value=8>Home made Lasagna Ravioli or Manicotti</option>
 <option value=9>Homemade Galzones</option>
 <option value=10>Wraps</option>
 <option value=10>Grinders</option>
</select>
</form>
<?
if (isset($_GET['id'])) {
    if ($_GET['id']==0) {
        //display 'all' menu
        }
    if ($_GET['id']==2) {
        //display 'Pizza' menu
        }
    if ($_GET['id']==4) {
        //display 'Special Dinners' menu
        }
    if ($_GET['id']==5) {
        //display 'Side Orders' menu
        }
    if ($_GET['id']==6) {
        //display 'Salads' menu
        }
    if ($_GET['id']==7) {
        //display 'Spaghetti or Ziti' menu
        }
    if ($_GET['id']==8) {
        //display 'Home mad Lasagna Ravioli or Manicotti' menu
        }
    if ($_GET['id']==9) {
        //display 'Homemade Galzones' menu
        }
    if ($_GET['id']==10) {
        //display 'Wraps/Grinders' menu
        }
    }
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The following is a sample of a very basic email form which you can try editing:

<?
if (isset($_POST['subject']) && $_POST['message']!=='')
    {
    $address = "your_real_email@domain.com"; //change this to the receiving address.
    $subject = "Website Email: ".$_POST['subject'];
    if ($_POST['name']!=='')
        {
        $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message']."<br>
<br>
Yours Sincerely<br>
".$_POST['name']."</td></tr></table>";
        } else {
        $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message'].
        "</td></tr></table>";
        }
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: do_not_reply@your_website_form' . "\r\n";
    
    mail($address,$subject,$body,$headers);
    }
//below displays the form while above processes it.
echo "<form method='post'>Subject: <input type=text value='' maxlength=100 name='subject' size=30><br>
<textarea cols=30 rows=20 name='message'></textarea><br>Name: <input type='text' value='' name='name'>
<input type='submit' value='submit'></form>";
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Yer but im 16 and the only languages I know are PHP, Perl, Python and C# I also think that creating a new user might make them find out. Or proxy is highly monitored.

I have not yet mentioned to use a different language. What sockets are is just another part of php which can be found out at http://au2.php.net/manual/en/function.socket-create.php Although I have never used php sockets before, from what I have read, the opening connection will look something like the following:

$ipaddress='';// server ip address
$socket = socket_create (AF_INET, SOCK_STREAM, tcp);
socket_connect($socket,$ipaddress, 80);

Then after that connection established you can do whatever communications with the server using php sockets.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

FYI, Notice is not an error and can be turned off with different Error reporting values..

Edit: It is kind of an error, but can be ignored. (Doh!)

I agree. It is only commercial code that you need to worry about the notice errors. So place the following at the top of your file:

error_reporting(E_ALL ^ E_NOTICE);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

...

$url=$_SERVER['HTTP_REFERER'];

when u reloading the page then u need to give the link to $url;

That will not work all the time since not all browsers send the referer information. That is why it is best to first check if the referer array is empty, if it is empty then use javascript else use the php referer.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hmm...doesnt seem to be working. Is this query valid?

SELECT * FROM list WHERE title LIKE '%$search%' AND where url LIKE '%$sites%'

The mysql query should look more like the following:

SELECT * FROM list WHERE title LIKE '%$search%' AND url LIKE '%$sites%'

or for my preference

mysql_query("SELECT * FROM `list` WHERE `title` LIKE '%".$search."%' AND `url` LIKE '%".$sites."%'");

Also note that $search and $sites must not be an array when used in the query. If you do use an array in a mysql query and you don't specify the exact value (example: $search[0]) Then it will just scan the database for the word 'Array'. So if $search and $sites are arrays then you may need to put the query inside a loop and for testing purposes you could use the following:

mysql_query("SELECT * FROM `list` WHERE `title` LIKE '%".$search[0]."%' AND `url` LIKE '%".$sites[0]."%'");
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

FOUND IT (i think)

Try making the following your code as you missed the last closing bracket on the last line.

<?php

define("ContactEmail", "highwebgeeta@gmail.com");
$error_msg = 'The following fields were left empty or contain invalid information:<ul>'; 
$error = false;

$submit = $_POST['submit']; 
if (empty($submit)) 
$form_submitted = false; 
else 
$form_submitted = true; 

if ($form_submitted) { 
$title = $_POST['title']; 
$name = $_POST['name']; 
$lname = $_POST['lname']; 
$address = $_POST['address']; 
$pin = $_POST['pin']; 
$country = $_POST['country']; 
$contact = $_POST['contact']; 
$email = $_POST['email']; 

if(!$name) { $error_msg .= "<li>Full Name</li>"; $error = true; } 
if(!$email) { $error_msg .= "<li>E-mail Address</li>"; $error = true; } 
if(!$contact) { $error_msg .= "<li>contact</li>"; $error = true; } 
if($email) { if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$", $email)){ $error_msg .= "<li>E-mail Address</li>"; $error = true; }} 
$error_msg .= "</ul>"; 

if (!$error) { 

$msg = "Full Name: \t $name \n"; 
$msg .= "Contact: \t $contact \n"; 
$msg .= "E-mail Address: \t $email \n"; 
$msg .= "address: \n---\n $address \n---\n";

$mailheaders = "Enquiry"; 
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n"; 
$mailheaders .= "From: $name <$email>\r\n"; 
$mailheaders .= "Reply-To: $name <$email>\r\n"; 

mail("highwebgeeta@gmail.com", $subject , stripslashes($msg), $mailheaders);
} 
?> 

<?php 
// email was successfully send 
if (($form_submitted) && (!$error)) { 
?> 
<!-- display submitted data --> 
Thank you for your feedback, <?php echo $name; ?>. 
This is the information you submitted:<br><br><?php echo nl2br(stripslashes($msg));
} ?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you are talking about when going from one page to $_POST data is submitted then their might be a chance of doing it with curl but instead I would recommend using sessions.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just checked you script for what line is 61 and your script only goes to line 52. Could you post from lines 50 to 62 so I can see what needs fixing?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

i create a contact form that link to 5 pages , please help me to create a contact form using php..

Well what seems to be the problem. Does it not function properly or are the errors reported. If so, what are the errors reported.
Also I noticed your mail function is incorrect and needs to be as follows:

mail("ContactEmail", $subject , stripslashes($msg), $mailheaders);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Thats amazing, thank you so much. What I will have to do is to tell my users to set site:example.com first then put the query. To make it easier.

So, to get the query. Ive done this...

$search = explode(' ', $string);
echo $search[1];

It works but is pretty rudimentary, would you recomend something better?

Yes, using the explode function would be the best way to get all of the keywords but in your example, you have got the site:example.com as a keyword below is how I would do it.

$string='test site:example.com site:test.com test2';
if (preg_match('/site:/i',$string))
    {
    preg_match_all('/site:[^ ]+/i',$string,$site);
    for ($ii=0;isset($site[0][$ii]);$ii++)
        {
        $site[0][$ii]=strtolower(substr($site[0][$ii],5,strlen($site[0][$ii])));
        }
    $sites=$site[0];  unset($site);
    }
$search=explode(' ',preg_replace('/[\h]+/',' ',preg_replace('/site:[^\h]+/i','',$string)));


//now to display
echo "<b>Sites</b><br>";
foreach ($sites AS $siteval)
    {
    echo $siteval."<br>";
    }
echo "<br><b>Keywords</b>";
foreach ($search AS $val)
    {
    echo "<br>".$val;
    }
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well if you are trying to get an admin password then wouldn't the most logical thing be to first work out how to communicate with their proxy server (probably sockets). Then to do a password injection into their system so there is a new account then when you go to use their computers simply use the admin password you injected into their system. I hear that is how most online hackers hack into websites.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I think the section for Government & Economics will get slower as we enter the global resession. But a very good link as I never knew any of those figures before.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I strongly believe in evolution and I even suspected of a simular thing happening (common ancestry) before I even heard the first thing about evolution. And the southpark clip is very funny in the way it explains it. But unfortunately only 40% of Americans believe in evolution because it contradicts with the legends of the pesence of a god.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you want a random password for general purposes then simply just do a hash of the current date, time and microtime. The following is an example:

echo substr(hash('sha1',date('d F Y G i s u')),0,10);

But if you are trying to hack into a school network like you have mentioned then try the following:

//settings
$chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz";
$minchars=8;
$maxchars=10;

//rest of script
$escapecharplus=0;
$repeat=mt_rand($minchars,$maxchars);
while ($escapecharplus<$repeat)
    {
    $randomword.=$chars[mt_rand(1, strlen($chars)-1)];
    $escapecharplus+=1;
    }
//display random word
echo $randomword;

The above code is what I used in my sha1 cracker.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well I suppose you could try the different php encryption functions to see what works but if it is binary then there are no garrantees that it can be converted with php. Where-as if it is just jumbled up text then you can use the powerful php regex library to do the conversion.