Fatal error: Call to undefined function dean-ueki@hotmail.com() in F:\xampp\htdocs\contact.php on line 87

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--


-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    </div>
    <div id="menu">
      <ul>
        <li class="current_page_item"><a href="homepage.php">Homepage</a></li>
        <li><a href="trip.php">Destinations</a></li>
        <li><a href="contact.php">contact </a></li>
        <li><a href="registration.php">Login</a></li>
        <li><a href="adminlogin.php">Leader</a></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
  <blockquote>
    <blockquote>
      <p> <center><img src="../../Documents/Unnamed Site 2/IMG_1913.jpg" width="999" height="388"  alt=""/></center>  </p>
    </blockquote>
  </blockquote>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Contact US</a></h2>
            <div class="entry">
                <table border='1'>

    </div>
<table width="400" border="0" acellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>





</body>
</html>


    <?php



    if (isset($_POST['submit'])){

            $name = $_POST['name'];
            $mail = $_POST['email'];
            $message = $_POST['message'];

            $to = "dean-ueki@hotmail.com";
            $subject = "New Contact us form";
            $message = "A new message has been sent by $mail \n
            Their message was $message \n \n
            Their Details: \n
            Name: $name \n
            Email: $mail From:email@email.com\r\n\n";


            if ($name) {


                    if($mail) {

                            if ($message){

                                     $mail ($to, $subject, $message);

                                    echo "Thank you for your message";



                            } else {



                                    echo "Please enter some comments";
                            }


                    } else {

                            echo "Please enter an email address";
                    }

            } else {

                    echo "Please enter your name";

            }



    } else {

    //Form Built by TPGS   
    ?>

                            <form action="contact.php" method="post">
                            Name: <input type="text" name="name" /><br /><br />
                            Email: <input type="text" name="email" /><br /><br />
                            Message: <textarea name="message" rows="20" cols="40"></textarea><br /><br />
                            <input type="submit" name="submit" value="Submit" />

                            </form>


    <?php
    }

    ?>

Recommended Answers

All 6 Replies

I would think Python interpreter would not like this stuff you posted to Python forum (as well as your other PHP post), moving this also to PHP forum.

$mail() should be mail()

i did it came out Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\xampp\htdocs\contact.php on line 91

<?php
ini_set("sendmail_from", "Website <website@google.com>"); 
?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--


-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    </div>
    <div id="menu">
      <ul>
        <li class="current_page_item"><a href="homepage.php">Homepage</a></li>
        <li><a href="trip.php">Destinations</a></li>
        <li><a href="contact.php">contact </a></li>
        <li><a href="registration.php">Login</a></li>
<li><a href="adminlogin.php">Leader</a></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
  <blockquote>
    <blockquote>
      <p> <center><img src="../../Documents/Unnamed Site 2/IMG_1913.jpg" width="999" height="388"  alt=""/></center>  </p>
    </blockquote>
  </blockquote>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Contact US</a></h2>
<div class="entry">
<table border='1'>

    </div>
<table width="400" border="0" acellpadding="3" cellspacing="1">
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>





</body>
</html>


    <?php



    if (isset($_POST['submit'])){

            $name = $_POST['name'];
            $mail = $_POST['email'];
            $message = $_POST['message'];

            $to = "dean-ueki@hotmail.com";
            $subject = "New Contact us form";
            $message = "A new message has been sent by $mail \n
            Their message was $message \n \n
            Their Details: \n
            Name: $name \n
            Email: $mail From:email@email.com\r\n\n";


            if ($name) {


                    if($mail) {

                            if ($message){

                                     mail($to, $subject, $message);

                                    echo "Thank you for your message";



                            } else {

                                    echo "Please enter some comments";
                            }


                    } else {

                            echo "Please enter an email address";
                    }

            } else {

                    echo "Please enter your name";

            }



    } else {

    //Form Built by TPGS  
    //Form Edited by Keith ( DrTrans @ PHP Freaks). 
    ?>

                            <form action="contact.php" method="post">
                            Name: <input type="text" name="name" /><br /><br />
                            Email: <input type="text" name="email" /><br /><br />
                            Message: <textarea name="message" rows="20" cols="40"></textarea><br /><br />
                            <input type="submit" name="submit" value="Submit" />

                            </form>


    <?php
    }

    ?>

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\xampp\htdocs\contact.php on line 91

That means there is no smtp mail server running at localhost.

i got this while i try to create a admin login page
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in F:\xampp\htdocs\s.php on line 105

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...l1-strict.dtd">
<!--


-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googlea...=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googlea...css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">

  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    </div>
    <div id="menu">
      <ul>
        <li class="current_page_item"><a href="homepage.php">Homepage</a></li>
        <li><a href="trip.php">Destinations</a></li>
        <li><a href="contact.php">contact </a></li>
        <li><a href="registration.php">Login</a></li>
        <li><a href="adminlogin.php">Leader</a></li>
        <li></li>
        <li></li>
      </ul>
    </div>
  </div>
  <blockquote>
    <blockquote>
      <p> <center><img src="sd.jpg" width="999" height="300"  alt=""/></center>  </p>
    </blockquote>
  </blockquote>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Welcome Admin</a></h2>
<form action="" method="post">
<table align="center" style="cellpadding: 10px; cellspacing: 10px;">

<tr><td>username:</td>
<td><input type="text" name="username"/></td></tr>

<tr><td>password:</td>
<td><input type="password" name="password"/></td></tr>
<tr><td>
</td><td><input type="submit" name="submit"/></td></tr>
</table>
</form>
</body>
</html>

<div class="entry">

</div>
    </div>
  </div>
<?php
session_start() ;


$username=$_POST['username'];
$password=$_POST['password'];





if ($username==('admin') && $password==('123') ) {


    $_SESSION['username'];
    $_SESSION['password'];
    header('location:login33.php');

}
else echo 'something went wrong! Try again. Thanks.' ;

?>


</body>
</html>

you post the wrong file
post F:\xampp\htdocs\s.php

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.