Jump to content

m@m

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by m@m

  1. I'm using this code to Edit fom. Error : Notice: Undefined index: Title in C:\wamp\www\MyProject\admin\edit.php on line 96 Here i have paste the coding(I've removed some coding part..issue arise on Line 68 in this pasted code ) <?php $id = isset($_REQUEST['Id']) ? $id = $_REQUEST['Id'] : ''; if ($id != 0) { mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("halftimedb") or die(mysql_error()); $sql = "SELECT Id,Title,description,Image,Category from News WHERE Id='" . $id . "'"; $query = mysql_query($sql); $row = mysql_fetch_array($query); ?> <form action="edit.php" method="POST" enctype="multipart/form-data"> <div class="OuterWrapper" background-color:white; > <div class="row" id="wrapper" > <div class="col-xs-3" style="margin-top:5%"> Title </div> <div class="col-xs-3" style="margin-top:5%"> <input type="hidden" name="Title" class="form-control" value="<?php echo $row[0] ?>" > <input type="text" name="Title" class="form-control" value="<?php echo $row[1] ?>" > </div> </div> <div class="row"> <div class="col-xs-3"> Description </div> <div class="col-xs-3"> <input type="text" name="description" class="form-control" value="<?php echo $row[2]; ?>"> </div> </div> <div class="row"> <div class="col-xs-3"> Image </div> <div class="col-xs-3"> <div> <img src='data:image/jpeg;base64,<?php echo base64_encode($row[3]) ?>' /> </div> <input type="file" name="image"> </div> </div> <div class="row"> <div class="col-xs-3"> Category </div> <div class="col-xs-3"> <select name="select_category" class="form-control"> <option value="0" <?php if ($row[4] == '0') echo 'selected'; ?> >-- Select Category --</option> <option value="1" <?php if ($row[4] == '1') echo 'selected'; ?>>What's New</option> <option value="2" <?php if ($row[4] == '2') echo 'selected'; ?>>The Time For a Program</option> <option value="3" <?php if ($row[4] == '3') echo 'selected'; ?>>Event Information</option> </select> </div> </div> <div class="row"> <div class="col-xs-3" style="margin-left:28%"> <input type="submit" name="submit" value="Submit" class="btn btn-default"> </div> <div> </form> <?php $Title = mysql_real_escape_string($_POST["Title"]); // <-- Undefined Index Title Line 96 //$description_save = $_POST['description']; //$Category = $_POST["select_category"]; mysql_query("UPDATE News SET Title ='$Title', Description ='$description_save' WHERE Id = '$id'") or die(mysql_error()); echo "Succesfully Updated!"; //header("Location: list.php"); } ?> Can anyone please help me to solve this issue............
  2. Here is the User profile search form... when i search that all details comes without Employee's Photo.. What's the error ? </head> <body> <?php $uname = $_POST['uname']; $sql = "SELECT * FROM emp WHERE uname = '$uname'"; $result = mysql_query($sql); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_array($result)) { $fname = $row['fname']; $lname = $row['lname']; $email = $row['email']; $address = $row['address_1']; $address2= $row['address_2']; $address3= $row['address_3']; $image = $row['image']; $gender=$row['gender']; $mobile=$row['tp_mobile']; $land=$row['tp_lnd']; $bod=$row['bod']; } } ?> <div class="main"> <div class="header"> <div class="header_resize"> <div class="logo"><h1></h1></div> <div class="clr"></div> <div class="search"> <form id="form1" name="form1" method="post" action="emp_profile.php"> <span> <input name="uname" type="text" class="keywords" id="textfield" maxlength="50" /> </span> <input name="image" type="image" src="images/search.gif" class="button" /> </form> </div> <div class="menu"> <ul> <!-- <li><a href="index.html" class="active">Home</a></li> <li><a href="services.html">Services</a></li> <li><a href="about.html"> About Us </a></li> <li><a href="contact.html"> Contact Us</a></li> --> </ul> </div> </div> <div class="clr"></div> </div> <div class="clr"></div> <div class="body"> <div class="body_resize"> <form id="" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" accept-charset='UTF-8'> <div id="container"> <fieldset > <div id="content-container1"> <div id="content-container2"> <div id="section-navigation"> <img align="top" width="175" height="200" src="emp_images/<?php echo $image; ?>"/> <div> <!-- <label>Patient Name : </label> --> <br /> </div> </div> <div id="content" align="justify"> <h2> <label for="fname"> <?php echo $fname; ?></label> <label for="lname"> <?php echo $lname; ?></label> </h2> <p> <label><b>Email:</b></label> <br /> <label for="email"> <?php echo $email; ?></label> </p> <p> <label><b>Employee Address:</b></label> <br /> <label > <?php echo $address; ?></label> </p> <p> <label><b>Employee Address 2:</b></label> <br /> <label > <?php echo $address2; ?></label> <p> <label><b>Employee Address 3:</b></label> <br /> <label > <?php echo $address3; ?></label> <p> <label><b>Gender:</b></label> <br /> <label > <?php echo $gender ?></label> </p> <p> <label><b>Employees Mobile:</b></label> <br /> <label > <?php echo $mobile ?></label> </p> <p> <label><b>Employees Resident Number:</b></label> <br /> <label > <?php echo $land ?></label> </p> <p> <label><b>Date of Birth:</b></label> <br /> <label > <?php echo $bod ?></label> </p> </div> </div> </fieldset> <div class="clr"></div> </div> </div> </form> <div class="footer"> <div class="footer_resize"> <p>© P2011-001</p> </div> <div class="clr"></div> </div> </div> </div> </div> </body> </html> <?php mysql_close($con); ?>
  3. Hi, Last day accidently deleted WAMP server.I need a database that i have installed already,Then i restored the machine to the previous the day.Yes,then again i saw the WAMP server but WAMP server not strating.. just saw RED icon.i did Restart All services several times but still having a problem,I want only 1 database script that i have alredy installed. Give me a solution :'(
  4. I have some knowledge in PHP.Can anyone please explain What has happend in that coding part.. :'( Thanks
  5. yes,you're correct.but here i paste all of these because experts can understand it very easily.... anyway can anyone pls explain this coding part .. $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }
  6. I wanted to understand this coding.Please help me. :'( <?php require_once('Connections/doctorsblog.php'); ?> <?php // Load the common classes require_once('includes/common/KT_common.php'); // Load the tNG classes require_once('includes/tng/tNG.inc.php'); // Make a transaction dispatcher instance $tNGs = new tNG_dispatcher(""); // Make unified connection variable $conn_doctorsblog = new KT_connection($doctorsblog, $database_doctorsblog); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $mes=""; $maxRows_Recordset1 = 4; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1']; } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; mysql_select_db($database_doctorsblog, $doctorsblog); $query_Recordset1 = "SELECT * FROM blog WHERE status = 1 ORDER BY blogid DESC"; $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1, $doctorsblog) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1']; } else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); } $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; if(isset($_POST['kt_login1'])) { $newencrypass=md5($_POST['password']); $newencrypass=trim($newencrypass); $user=trim($_POST['admin_username']); mysql_select_db($database_doctorsblog, $doctorsblog); $query_Recordset3 = "SELECT * FROM doctors WHERE username = '{$user}' and encryptedpassword='{$newencrypass}'"; $Recordset3 = mysql_query($query_Recordset3, $doctorsblog) or die(mysql_error()); $row_Recordset3 = mysql_fetch_assoc($Recordset3); $totalRows_Recordset3 = mysql_num_rows($Recordset3); if($totalRows_Recordset3>0) { /*//$normal_pass = $_POST['password']; $encripted_pass = $row_Recordset2['encryptedpassword']; if(md5($normal_pass) == $encripted_pass) $encrppassword=$row_Recordset2['encryptedpassword']; else $encrppassword=md5($normal_pass); */ // Make a login transaction instance $loginTransaction = new tNG_login($conn_doctorsblog); $tNGs->addTransaction($loginTransaction); // Register triggers $loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1"); $loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}"); // Add columns $loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "admin_username"); $loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "password"); // End of login transaction instance // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rscustom = $tNGs->getRecordset("custom"); $row_rscustom = mysql_fetch_assoc($rscustom); $totalRows_rscustom = mysql_num_rows($rscustom); } if($totalRows_Recordset3==0){ $mes="Invalid username or password"; } } ?> <!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>Blogs Home</title> <script type="text/javascript" src="images/jquery_002.js" charset="utf-8"></script> <script type="text/javascript" src="images/jquery.js" charset="utf-8"></script> <!--<script type="text/javascript"> jQuery(function() { jQuery('body').showMessage({'thisMessage':['First login then manage blogs.'],className:'success',displayNavigation:false,useEsc:false,delayTime:2000, autoClose:true}); }); </script> --> <style type="text/css"> <!-- body { background-color: #c6c6c6; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(); } .success { font-family: Arial, Helvetica, clean, sans-serif; font-size: 15px; font-weight: bold; background-color: #93BBD9; padding:0px; width:200px; margin:0px; color: black; text-align:center; border-radius:0 0 18px 18px; -moz-border-radius:0 0 18px 18px; } .success ul { padding:0px; margin:0px; } body a{color:#CC3366; text-decoration:none; font-family:Verdana, Arial, Helvetica, sans-serif; } --> </style> <script language="JavaScript" src="images/validate.js"></script> <script language="JavaScript" src="images/validate_002.js"></script> <link href="images/directory.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 {color: #b61850} --> </style> <script type="text/javascript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> <style type="text/css"> <!-- .style2 {color: #333333} .style3 {color: #FFFFFF} .style1 {color: #b61850} --> </style> </head> <body><div class="success" id="showMessage" style="position: fixed; z-index: 1001; left: 0px; width: 100%; margin: 0px; opacity: 0.9; top: 0px; display: none;"><div style="width: 90%; margin: 1em auto; padding: 0.5em;"><ul style="font-size: large; font-weight: bold; margin-left: 0px; padding-left: 0px;"><li style="list-style: none outside none;">First login then manage blogs.</li></ul></div></div> <table width="1044" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td background="images/whitebg.jpg"><table width="1000" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" align="left"><table width="1000" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="1000" height="143" align="center"><?php include("header.php");?></td> </tr> </tbody></table></td> </tr> <tr> <td valign="top" align="left"> <table width="1000" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td class="pinkverdana10" height="40" valign="middle" align="left"> Home</td> </tr> <tr> <td class="pinkverdana10" height="10" valign="middle" align="left"></td> </tr> <tr> <td valign="top" align="left"><table class="verdana10" width="983" align="center" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" width="79%"><table width="98%" align="left" bgcolor="#93BBD9" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td width="12"><img src="images/yellow1.jpg" height="16" width="12"></td> <td height="16" width="100%" background="images/yellowtop.htm"></td> <td height="16" width="2%" align="right"><img src="images/yellow2.jpg" height="16" width="12"></td> </tr> <tr> <td align="left" background="images/yellowleft.htm"> </td> <td height="30" valign="top" align="left"><span class="welcome">BLOGS</span></td> <td background="images/yellowrghitr.htm"> </td> </tr> <tr> <td align="left" background="images/yellowleft.htm"> </td> <td class="verdana_gary12" valign="top" align="left"> </td> <td background="images/yellowrghitr.htm"> </td> </tr> <tr> <td align="left" background="images/yellowleft.htm"> </td> <td valign="top" bgcolor="#93BBD9"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" align="left"><table width="100%" bgcolor="#93BBD9" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" width="678" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" align="left"><table class="arielblack" width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" width="20" align="left"> </td> <td valign="top" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td valign="top" align="left"><?php do { ?> <?php mysql_select_db($database_doctorsblog, $doctorsblog); $query_Recordset2 = "SELECT * FROM doctors WHERE docid = ".$row_Recordset1['fromassociated'].""; $Recordset2 = mysql_query($query_Recordset2, $doctorsblog) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td valign="top" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td class="welcome" valign="top" align="left"><a href="showdetail.php?id=<?php echo $row_Recordset1['blogid']; ?>" style="color:#154A75;"><?php echo $row_Recordset1['btitle']; ?></a></td> <td valign="top" width="10" align="left"> </td> <td valign="top" width="170" align="right"><span class="verdana_yellow12">Posted by <?php echo $row_Recordset2['fname']; ?> <?php echo $row_Recordset2['lname']; ?><br> <?php echo date('M d, Y', strtotime($row_Recordset1['postdate'])); ?></span></td> </tr> </tbody></table></td> </tr> <!--<tr> <td align="left" valign="top" class="bottomline"> </td> </tr> --> <tr> <td valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="left"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td valign="top" align="left"> <?php $length=strlen($row_Recordset1['description']); if($length>200) { $actual=substr_replace($row_Recordset1['description'], '...', 200, $length); echo $actual; } else{ echo $row_Recordset1['description']; } ?> <a href="showdetail.php?id=<?php echo $row_Recordset1['blogid']; ?>" style="color:#154A75; font-weight:bold;">Read More...</a></td> </tr> <tr> <td valign="top" align="left"> </td> </tr> <tr> <td class="tags" valign="top" align="left">Tags: <span style="color:#154A75; font-weight:bold;"><?php echo $row_Recordset1['tagscloud']; ?> </span></td> </tr> <tr> <td class="bottomline" valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="left"> </td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?></td> </tr> </tbody></table></td> <td valign="top" width="35" align="left"> </td> </tr> </tbody></table></td> </tr> <tr> <td valign="top" align="left"> </td> </tr> <tr> <td valign="top" align="center"><!--<table width="50%" border="0" cellspacing="1" cellpadding="0"> <tr class="whiteariel11"> <td width="29%" align="right"><span class="redarielblack"><a href="#" class="redarielblack">Result Page previous</a> :: </span></td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95" class="whiteariel11"><a href="#" class="whiteariel11">1</a> </td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95"><a href="#" class="whiteariel11">2</a></td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95"><a href="#" class="whiteariel11">3</a></td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95"><a href="#" class="whiteariel11">4</a></td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95"><a href="#" class="whiteariel11">5</a></td> <td width="5%" align="center" valign="middle" bgcolor="#F60E95"><a href="#" class="whiteariel11">6</a></td> <td width="11%" align="left"><span class="redarielblack"> :: <a href="#" class="redarielblack">Next</a></span></td> </tr> </table> --></td> </tr> <tr> <td valign="top" align="left"></td> </tr> </tbody></table></td> </tr> </tbody></table></td> </tr> </tbody></table></td> </tr> </tbody></table></td> <td background="images/yellowrghitr.htm"> </td> </tr> <tr> <td align="left"><img src="images/yellow3.jpg" height="16" width="12"></td> <td background="images/yellowbootam.htm"></td> <td align="right"><img src="images/yellow4.jpg" height="16" width="12"></td> </tr> </tbody></table></td> <td valign="top" width="21%" align="right"><?php include("right.php");?></td> </tr> </tbody></table> <p> </p> <p> </p></td> </tr> <tr> <td> </td> </tr> <tr> <td height="1" bgcolor="#e8e8e8"></td> </tr> <tr> <td> </td> </tr> <tr> <td class="copyright" align="center"><?php include("footer.php");?></td> </tr> </tbody></table></td> </tr> <tr> <td valign="top" align="left"> </td> </tr> </tbody></table></td> </tr> <tr> <td height="20" background="images/whitebgfooter.jpg"> </td> </tr> </tbody></table> </td></tr></tbody></table></body></html> <?php mysql_free_result($Recordset1); mysql_free_result($Recordset2); mysql_free_result($Recordset3); ?> Anyone Please explain this coding for me.... Thanks Lot.
  7. in here subjects,from/to email addresses hardcode know? only go from specific address know?
  8. i read that but i don't now hoe to apply this to my form
  9. I google it ..but i'm fresher to php If you can please do it for me thanks
  10. In here theres a 3 fileds.. 1.Name 2.Email 3.Message I need when someone fill this form and click submit button then that all the data go to example@gmail.com address... need php coding for that exact form here ( http://sliit2011.net46.net/doctorsblog/blogrequest/index.php)
  11. index.php file ------------------- <?php include_once("recaptchalib.php"); define("PUB_KEY", "6LfUuMcSAAAAAAY3ykPm2KZ2cHnSyoSRDaG1zTZi"); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Request Form</title> <style type='text/css'> body { font-size: 14px; line-height:1.3em; text-align:center; } #wrapper { width:600px; margin:0 auto; text-align:left; padding:6px; } .message { text-align:left; width:100%; padding:15px 22px; display:none; } .loader { background:url("images/ajax-loader.gif") no-repeat center left; } .success { background:url("images/success.png") no-repeat center left; } .error { background:url("images/error.png") no-repeat center left; } .infoWrapper { clear:both; margin-top:10px; } .infoTitle { color:#808080; float:left; width:110px; text-align:right; } .infoContent { padding-left:130px; text-align: left; } label { cursor:pointer; } .input-text { border:1px solid #808080; } .long { width:450px; } .tall { height:150px; } </style> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'></script> <script type="text/javascript" src="functions.js"></script> </head> <body> <div id='wrapper'> <h4>Blog Account Request Form</h4> <div class='message'> </div> <form name='contact' id='contact'> <div class="infoWrapper"> <div class="infoTitle"> <label for='name'>Name</label> </div> <div class="infoContent"> <input type="text" name='name' id='title' class='input-text long' /> </div> </div> <div class="infoWrapper"> <div class="infoTitle"> <label for='email'>Email</label> </div> <div class="infoContent"> <input type="text" name='email' id='title' class='input-text long' /> </div> </div> <div class="infoWrapper"> <div class="infoTitle"> <label for="message">Message</label> </div> <div class="infoContent"> <textarea name='message' id='note' class='input-text long tall'></textarea> </div> </div> <div class="infoWrapper"> <div class="infoTitle"> <label for="">Are you human?</label> </div> <div class="infoContent"> <?php echo recaptcha_get_html(PUB_KEY); ?> </div> </div> <div class="infoWrapper"> <div class="infoTitle"></div> <div class="infoContent"> <input type='submit' value='Send Message'/> </div> </div> </form> </div> </body> </html>
  12. Here i have attached PHP contact form.Anyone filled this form and then need to go email to the admin . as example admin uses example@gmail.com as his email address... how can i do this ? in simply when i filledout this form and click Submit button then that information need to go admins email address(example@gmail.com ) Thanks [attachment deleted by admin]
  13. i'm new here thats why this mistake :'( i'll post it there .. thx
  14. I use this javascript validation in my form.. http://www.tizag.com/javascriptT/javascriptform.php but without validation values go to database.. Can anyone guide me how to solve this? First i import javascript file like this.. <script type="text/javascript" src="validate.js"></script> My code goes like this.... [m] <!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> <title>HotWebsiteTemplates.net</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="js/jquery.js" type="text/javascript"></script> <script type="text/javascript" src="js/cufon-yui.js"></script> <script type="text/javascript" src="js/georgia.js"></script> <script type="text/javascript" src="js/cuf_run.js"></script> <script type="text/javascript" src="validate.js"></script> <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script> <!--<script type="text/javascript" src="js/jquery-1.6.min.js"></script>--> <script type="text/javascript" src='js/jquery-ui-1.8.10.custom.min.js'></script> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript" src="js/jquery.tools.min.js"></script> <!--<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script> <script src="js/jquery.validationEngine.js" type="text/javascript"></script> --> <script type="text/javascript"> $(function() { $( "#accordion" ).accordion({ <!--event: "mouseover" --> }); }); </script> <script type="text/javascript"> $(function() { $( "#accordion_1" ).accordion({ <!--event: "mouseover" --> }); }); </script> <script type="text/javascript"> $(function() { $( "#accordion_2" ).accordion({ <!--event: "mouseover" --> }); }); </script> <script type="text/javascript"> $(function() { $( "#tabs" ).tabs(); }); </script> <script type="text/javascript"> $(function() { $( "#datepicker" ).datepicker(); }); </script> <!-- Jquery UT - Start CSS --> <link rel="stylesheet" href="css/jquery-ui-1.8.14.custom.css" /> <link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/css/tooltip-generic.css"/> <!--<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>--> <style> /* simple css-based tooltip */ .tooltip { background-color: #06C; border:1px solid #fff; padding:10px 15px; width:150px; display:none; color:#fff; text-align:left; font-size:12px; font-weight:bold; font-style:italic; /* outline radius for mozilla/firefox only */ -moz-box-shadow:0 0 10px #000; -webkit-box-shadow:0 0 10px #000; } </style> <script> // execute your scripts when the DOM is ready. this is a good habit $(function() { // select all desired input fields and attach tooltips to them $("#reg :input").tooltip({ // place tooltip on the right edge position: "center right", // a little tweaking of the position offset: [-2, 10], // use the built-in fadeIn/fadeOut effect effect: "fade", // custom opacity setting opacity: 0.8 }); }); </script> <script>/* jQuery(document).ready(function(){ // binds form submission and fields to the validation engine jQuery("#reg").validationEngine(); }); */ </script> <![endif]--> </head> <body> <div class="main"> <div class="header"> <div class="header_resize"> <div class="logo"><h1><a href="index.html"><small>put your slogan here</small>worker <span>company</span></a></h1></div> <div class="clr"></div> <div class="search"> <form id="form1" name="form1" method="post" action=""> <span> <input name="q" type="text" class="keywords" id="textfield" maxlength="50" value="Search..." /> </span> <input name="b" type="image" src="images/search.gif" class="button" /> </form> </div> <div class="menu"> <ul> <li><a href="index.html" class="active">Home</a></li> <li><a href="services.html">Services</a></li> <li><a href="about.html"> About Us </a></li> <li><a href="contact.html"> Contact Us</a></li> </ul> </div> </div> <div class="clr"></div> </div> <div class="clr"></div> <div class="body"> <div class="body_resize"> <div class="left"> <center> <br /> <br /> <br /> <br /> <div id="tabs" style="width:600px; height:620px; font-size:12px; font-family:Arial, Helvetica, sans-serif" > <ul> <li><a href="#tabs-1">Doctor Registration</a></li> <li><a href="#tabs-2">Nurse Registration</a></li> <li><a href="#tabs-3">Pharmacist Registration</a></li> <li><a href="#tabs-4">Minor staff Registration</a></li> </ul> <div id="tabs-1" style="font-size:10px"> <br/> <br/> <form action="Process_reg.php" method="post" name="reg" id="reg" onsubmit="return formValidator()"> <div id="accordion" style="width:400px; height:500px; font-size:12px; font-family:Arial, Helvetica, sans-serif"> <h3><a href="#">General Details</a></h3> <div> <table cellpadding="5px" cellspacing="5px"> <tr> <td>First name</td> <td><input type="text" name="fname" id="fname" size="20px" title="Must be at least 8 characters." /></td> </tr> <tr> <td> Last name</td> <td><input type="text" name="lname" id="lname" size="20px" title="Enter Last Name" /></td> </tr> <tr><div class="Demo"> <td> DOB</td> <td><input type="text" name="bod" id="datepicker" size="20px" title="Select Date" /></td></div> </tr> <tr> <td>Address 1</td> <td><input type="text" name="add1" id="add1" size="20px" title="Enter Address" /></td> </tr> <tr> <td>Address 2</td> <td><input type="text" name="add2" id="add2" size="20px" title="Enter Address" /></td> </tr> <tr> <td>Address 3</td> <td><input type="text" name="add3" id="add3" size="20px" title="Enter Address" /></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" id="email" size="20px" title="Enter Valid Email Address" /></td> </tr> <tr> <td>TP(Land)</td> <td><input type="text" name="tp_l" id="tp_m" size="20px" title="Home Phone" /></td> </tr> <tr> <td>TP(Mobile)</td> <td><input type="text" name="tp_m" id="tp_m" size="20px" title="Mobile Number" /></td> </tr> <tr> <td>Hospital</td> <td><select name="hospitals" id="hospitals" title="select a hospital"> <option>Select hospital</option> <?php $con = mysql_connect("localhost","chathura","123456"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("hospital", $con); $result = mysql_query("SELECT addr_1 FROM hospital"); while($row = mysql_fetch_array($result)) { ?> <option> <?php echo $row['addr_1']; ?> </option> <?php } ?> </select></td> </tr> <!-- <tr> <td>Employee Type</td> <td><select name="Employee_types" id="Employee_types" title=""> <option>Doctor</option> <?php // $con = mysql_connect("localhost","chathura","123456"); //if (!$con) //{ //die('Could not connect: ' . mysql_error()); //} //mysql_select_db("hospital", $con); //$result = mysql_query("SELECT name FROM emp_type"); //while($row = mysql_fetch_array($result)) //{ ?> <option> <?php //echo $row['name']; ?> </option> <?php // } ?> </select></td> </tr>--> <tr> <td>Image</td> <td><input type="file" name="img_search" id="img_search" size="20px" /></td> </tr> </table> </div> <h3><a href="#">Account details</a></h3> <div> <table cellpadding="5px" cellspacing="5px" > <tr> <td>Username</td> <td><input type="text" name="usr" id="usr" size="20px" title="Enter Username" /></td> </tr> <tr> <td>Password</td> <td><input type="password" name="psw" id="psw" size="20px" title="Use Strong Password" /></td> </tr> </table> </div> <h3><a href="#">Speciality Details</a></h3> <div> <table cellpadding="5px" cellspacing="5px"> <tr> <td> Education </td> <td><input type="text" name="edu" id="edu" size="20px" title="Eg:MBBS,FRCS" /></td> </tr> <tr> <td> Speciality </td> <td><input type="text" name="spec" id="spec" size="20px" title="Eg:Surgeon" /></td> </tr> <tr> <td> Speciality details </td> <td><input type="text" name="spec_data" id="spec_data" title="Eg:Surgeon-VOG" size="20px" /></td> </tr> <tr> <td></td> <td><input type="submit" name="sbt" id="sbt" value="Register" size="20px" /> <input type="reset" name="reset" id="reset" value="Reset" size="20px" /></td> </tr> </table> </div> </div> </form> </div> <div id="tabs-2" style="font-size:10px"> <form action="Process_reg.php" method="post" name="reg" id="reg"> <div id="accordion_1" style="width:400px; height:500px; font-size:12px; font-family:Arial, Helvetica, sans-serif"> <h3><a href="#">General Details</a></h3> <div> <table cellpadding="5px" cellspacing="5px"> <tr> <td>First name</td> <td><input type="text" name="fname" id="fname" size="20px" /></td> </tr> <tr> <td> Last name</td> <td><input type="text" name="lname" id="lname" size="20px" /></td> </tr> <tr><div class="Demo"> <td> BOD</td> <td><input type="text" name="bod" id="datepicker" size="20px" /></td></div> </tr> <tr> <td>Address 1</td> <td><input type="text" name="add1" id="add1" size="20px" /></td> </tr> <tr> <td>Address 2</td> <td><input type="text" name="add2" id="add2" size="20px" /></td>
  15. hi!, This is my first PHP program.and i wanted to develop it..but i havent more knowledge.i need your help to do this..... I wrote this PHP snippet to send SMS to my local network through mywebsite.Now i wanted to send a MMS to it.But i dont know How to attach image to it... Can you please help me to do this... Below is my SMS Code.... ===================================== if i change..... mail( "$to@sms.mobitel.lk", "$subject", to mail( "$to@mms.mobitel.lk", "$subject", then thisone send pefectly..without any issue....But i wanted to Send with Image..How can i attach a image to this programme(Upload images from my computer or Select available images) Can anyone give me a full code for this? and please intergrate that code to my code also or send me a Complete answer to how to do this? thanks
×
×
  • 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.