Jump to content

ankit.pandeyc012

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ankit.pandeyc012's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi friends... I am using Wamp with PHP 5.3 and want to connect with SQL Server 2005 but not successful. I also tried it with PHP 5.2.8 but it still not working. I google it and found some solutions but not successsful yet. Can anyone give me detailed guide (step by step) that how i can connect PHP with Sql Server 2005??? Thanks in advance...
  2. Hi friends... I have a variable $datetime= 140811 060632. Here 140811 represents date in ddmmyy format and 060632 represents time 06:06:32 and both are in string type. I have a column name "DtTime" in MSSQL of type "Datetime" stamp. Now when i try to insert my variable $datetime in above column of database it returns an "out of memory" error which means I think I have to convert my string to "datetime" stamp type first and then try to insert. I don't know how I can convert string to datetime type so that it inserts in column of "datetime" stamp type. Please help... Thanks in advance.....
  3. Thanks for your reply.. It works but my purpose is still not solved. It not inserts in database and throw out of range error. and I have a one more requirement also. Now, I want in $time variable add 5:30:00 and store in time format( so that it can be insert it in database) and I have date in ddmmyy format but in string type which i have to convert it in date mm-dd-yyformat ( again so that it can be insert it in database). How can I do these???
  4. <?php $myServer = "202.138.125.155"; $myUser = "micro_fms"; $myPass = "micro_fms*#$"; $myDB = "micro_fms"; //create an instance of the ADO connection object $conn = new COM("ADODB.Connection")or die("Cannot start ADO"); //define connection string, specify database driver $connStr = "PROVIDER='SQLOLEDB'; SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB; //Open the connection to the database $conn->open($connStr); //$table_name=$_GET['Device']; $table_data=$_GET['Data']; $data=(explode(",",$table_data)); $table_name=$data[0]; $speed=$data[1]; $time=$data[2]; $date=$data[3]; $lat=$data[4]; $long=$data[5]; //$newdate = substr($date,6,2) . "-" . substr($date,0,2) . "-" substr($date,3,2); $datetime=$date.$time; $new_lat = substr($lat,0,2).'.'.substr($lat,2); $new_long = substr($long,0,2).'.'.substr($long,2); echo $table_name."<br>"; echo $speed."<br>"; echo $new_lat."<br>"; echo $new_long."<br>"; echo $datetime."<br>"; $query="insert into $table_name (DeviceNumber,Speed,dtDateTime,Latitude,Longitude)values('$table_name','$speed','$datetime','$new_lat','$new_long')"; //execute the SQL statement and return records $rs = $conn->execute($query); if($rs) { echo 'Values Inserted'; } else { echo "faile"; } ?> Hi friends... I have two variables ($date and $time). I concat these two strings and make a new variable called "$datetime". Now in above code I want to insert it into table but I got the following error. Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for SQL Server<br/><b>Description:</b> Conversion failed when converting datetime from character string.' in C:\wamp\www\FMS\fms.php:44 Stack trace: #0 C:\wamp\www\FMS\fms.php(44): com->execute('insert into A00...') #1 {main} thrown in C:\wamp\www\FMS\fms.php on line 44 In my database, data type of column in which I want to insert is Date time stamp though I have string type ($datetime) variable. I think I have to convert this $datetime variable string to "DateTime type first but don't have any idea about it. Please help??/ Thanks in advance....
  5. Hi friends.... I want to add a customer support chat on my website in PHP. I downloaded some codes also from internet but their configuration is very difficult for me. Do anyone have code of Customer Support chatting in PHP?? Please share with me. or have any idea how I can start with??? Please friends Help...!!!!!!!! Thanks in advance.....
  6. I take title column as LongText and length is not defined. So, I think there is no problem with it......
  7. <html> <title>Micro Elite Brigade - Participated Events</title><LINK REL="SHORTCUT ICON" HREF="images/favicon.png"><?php require_once('upper.php'); if($_COOKIE['LoginIdCookie']){ require_once('database.php'); require_once('LoginStatement.php'); $LoginId=$_COOKIE['LoginIdCookie']; $query="select * from participation where LoginId='$LoginId'"; $result=mysqli_query($dbc,$query) or die ('Not Connected'); //echo "<div class='search_output_data'> echo "<table border='0' cellspacing='0' cellpadding='0'>"; echo "<tr><th align='left' valign='top' width='100' height='20'>Event Title</th> <th align='right' valign='top' width='250' height='30'>Date of Participation</th> </tr>"; while($row=mysqli_fetch_array($result)) { echo " <tr><td colspan='4' align='left' valign='top' ><table align='left' border='0' cellspacing='0' cellpadding='0'><tr><td align='left' valign='top' width='200' height='20'>".$row['Title']."</td> <td width='50'> </td> <td align='left' valign='top' width='130'>".$row['Date']."</td> </tr></table> </td></tr>"; } echo "</table>";} else{ echo 'Sorry, You must have to login.';} require_once('lower.php'); ?> HI friends..... I have a table named events in which I have a "Title" column. When I print the value of Title column, it not displayed not more than 40 characters.... Where is the problem ??? Anyone??????
  8. <?php exec('java -jar/MicroChatServer.jar',$output); print_r($output); ?> Hello frds......... I have chat prg. jar file and I have to integrate this chat in a PHP website uses Wampserver.... I try above code but it display "Array()" instead of execute jar file. What should I do???? Any idea?????????????//
  9. Frs get a look in this link in IE and then firefox http://173.255.216.128/EliteBrigade/index1.php U will understand my problem more correctly///////////
  10. <!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" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="date" content="2003-12-02T09:54:03+08:00" /> <meta http-equiv="imagetoolbar" content="no" /> <title>Dynamically enlarge image on mouseover and mouseout</title> <style type="text/css"> body {margin:64px;} #apDiv3 { position:absolute; left:188px; top:116px; width:100px; height:75px; z-index:1; } #apDiv4 { position:absolute; left:387px; top:113px; width:100px; height:75px; z-index:2; } </style> <script type="text/javascript"> // <![CDATA[ var glbInc, glbDec; function decreaseSizeImage(idname) // will get back to its normal default size { var id_name=idname; //var image_name=imagename; if(glbInc != null) {clearTimeout(glbInc); glbInc = null;}; if (document.getElementById(id_name).height > 100) { document.getElementById(id_name).height -= 30; document.getElementById(id_name).width -= 40; glbDec = setTimeout("decreaseSizeImage('"+id_name+"')", 32); }; } function increaseSizeImage(idname) { var id_name=idname; //var image_name=imagename; if(glbDec != null) {clearTimeout(glbDec); glbDec = null;}; if (document.getElementById(id_name).height < 216) { document.getElementById(id_name).height += 30; document.getElementById(id_name).width += 40; glbInc = setTimeout("increaseSizeImage('"+id_name+"')", 32); }; } // ]]> </script> </head> <body> <div id="apDiv3"><a href="#" onmouseover="increaseSizeImage('image2');" onmouseout="decreaseSizeImage('image2');"><img id="image2" src="ganesha.jpg" width="100" height="75" /></a></div> <p> </p> <div id="apDiv4"><a href="#" onmouseover="increaseSizeImage('image1');" onmouseout="decreaseSizeImage('image1');"><img id="image1" src="sai baba.jpg" width="100" height="75" alt="Krusty is helpless" /></a></div> <p> </p> <p id="validation"> </p> </body></html> HI frds........ I have two images which zooms on mouse over but zooming image don't overlap the neighbour image. It means zooming image and neighbour both are visible........... I want when one image zooms it overlaps the neighbour image so that only zooming image is visible..... Any one????????/ Plz help.................
  11. <?php echo '<!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"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />';?> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="js/jquery.jMagnify.js" ></script> <script type="text/javascript"> $(document).ready(function(){ $(".menu2 a").append("<em></em>"); $(".menu2 a").hover(function() { $(this).find("em").animate({opacity: "show", top: "-75"}, "slow"); var hoverText = $(this).attr("title"); $(this).find("em").text(hoverText); }, function() { $(this).find("em").animate({opacity: "hide", top: "-85"}, "fast"); }); }); $().ready(function() { $('#first').jMagnify(); }); $(document).ready(function() { $('div.demo-show:eq(0)> div:gt(0)').hide(); $('div.demo-show:eq(0)> h3').click(function() { $(this).next('div:hidden').slideDown('fast') .siblings('div:visible').slideUp('fast'); }); }); $().ready(function() { $('#color').jMagnify({ centralEffect: {'color': 'yellow'}, lat1Effect: {'color': 'orange'}, lat2Effect: {'color': 'red'}, lat3Effect: {'color': 'magenta'}, resetEffect: {'color': '#E3F1F2'} }); }); </script> <style type="text/css"> body .menu2 { margin: 100px 0 0; padding: 0; list-style: none; } .menu2 li { padding: 0; margin: 0 2px; float: left; position: relative; text-align: center; } .menu2 a { display: block; color: #000000; text-decoration: none; font-weight: bold; } .menu2 li em { font-weight: normal; background: url(images/hover.png) no-repeat; width: 180px; height: 45px; position: absolute; top: -85px; left: -15px; text-align: center; padding: 20px 12px 10px; font-style: normal; z-index: 2; display: none; } </style> </head> <?php echo ' <body> <div class="wrapper"> <div class="header_wrapper"> <div class="left_hand_symbol"><img src="images/header_hand_img.png" height="115" width="162"/></div> <div class="header"> <div class="logo"><img src="images/logo.png" height="171" width="136"/></div> <div class="title" > <img src="images/banner_title.png" width="500" height="56" /></div> <div class="right"> <div class="link">'; if(isset($_COOKIE['LoginIdCookie'])){ } //echo '<div class="login"><a href="log_out.php">Log out</a></div>'; //require_once('LoginStatement.php');} else{ echo'<div class="register" ><a href="RegistrationAndActivity.php">Register</a></div> <div class="link_ruler"> | </div> <div class="login"><a href="LoginValidator.php">Login</a></div>'; } echo'<div class="clear"><!-- --></div> </div> <div class="clear"><!-- --></div> </div> <div class="clear"><!-- --></div> </div> </div> <div class="container_wrapper"> <div class="nav"> <ul class="menu2"> <li> <a href="index1.php" title="Go to homepage">Home </a> </li> <li><a href="#" title="Our Voluntee">Voluntee </a></li> <li><a href="AboutUs.php" title="Find out who I am">About Us </a></li> <li><a href="EventDisplay.php" title="Show All Events">Events</a></li> <li><a href="NewsLinksAll.php" title="Latest News"> News </a></li> <li ><a href="PhotoGallery.php" title="Visit Elite Brigade Photo Gallery"> Photo Gallery</a></li> </ul> </div> <div class="clear"><!-- --></div> <div class="home_container"> <div><img src="images/body_top.png" width="906" height="12"></div> <div class="container_bg"> <div class="left"> <div><img src="images/left_box_top_img.png" width="219" height="14" /></div> <div class="background"> <div class="title">EVENTS</div> <div class="pruduct"> <ul> <li>* <a href="#">Whatexpect on Sundays</a></li> <li>* <a href="#">Location and directions</a></li> <li>* <a href="#">Where to go to wear</a></li> <li>* <a href="#">What for your child</a></li> <li>* <a href="#">Meet the staff</a></li> <li>* <a href="#">ExploreFaith.org</a></li> <li>* <a href="#">Mission Opportunities</a></li> </ul> </div> </div> <div><img src="images/left_box_bottom_img.png" width="219" height="15" /></div> </div> <div class="contain_box"> <div class="contain_title" id="color">Welcome to Elite Brigade</div> <div class="text">'; ?> Hi Friends... Above code perfectly runs in Firefox but when i try to run above code in IE(any version) then webpage breaks........ I think its compatibilty issue but how it will resolved????? Plz help me Thx in advance
  12. <html> <title>Micro Elite Brigade - Registration</title><LINK REL="SHORTCUT ICON" HREF="images/favicon.png"><?php require_once('upper.php'); require_once('database.php'); echo $error_msg=''; if(isset($_POST['submit'])) { $LoginId=mysqli_real_escape_string($dbc,trim($_POST['LoginId'])); $Password1=mysqli_real_escape_string($dbc,trim($_POST['Password1'])); $Password2=mysqli_real_escape_string($dbc,trim($_POST['Password2'])); $Name=mysqli_real_escape_string($dbc,trim($_POST['Name'])); $Age=mysqli_real_escape_string($dbc,trim($_POST['Age'])); $BloodGroup=mysqli_real_escape_string($dbc,trim($_POST['BloodGroup'])); /*if(!isset($_POST['Sex'])) { echo 'Please enter Sex<br>'; }*/ //else{ $Sex= mysqli_real_escape_string($dbc,trim($_POST['Sex'])); //} $Qualification=mysqli_real_escape_string($dbc,trim($_POST['Qualification'])); $ContactNumber=mysqli_real_escape_string($dbc,trim($_POST['ContactNumber'])); $Email=mysqli_real_escape_string($dbc,trim($_POST['Email'])); $Address=mysqli_real_escape_string($dbc,trim($_POST['Address'])); $AboutYourself=mysqli_real_escape_string($dbc,trim($_POST['AboutYourself'])); //$countCheck=count($_POST['checkbox']); //echo $countCheck; //$checkbox=$_POST['checkbox']; //$countCheck=count($checkbox); if(empty($LoginId)){echo 'Please enter Login Id';} elseif(empty($Password1)){echo 'Please enter Password';} elseif(empty($Password2)){echo 'Please confirm Password';} elseif($Password1!==$Password2){echo 'Password didn\'t match';} elseif(empty($Name)){echo 'Please enter Name';} elseif(empty($Age)){echo 'Please enter Age';} elseif(!isset($_POST['Sex'])){echo 'Please enter Sex';} elseif(empty($Qualification)){echo 'Please enter Qualification';} elseif(empty($ContactNumber)){echo 'Please enter Contact Number';} elseif(empty($Email)){echo 'Please enter Email';} elseif(empty($Address)){echo 'Please enter Address';} elseif(empty($AboutYourself)){echo 'Please enter About Yourself';} elseif(!isset($_POST['checkbox'])){ echo 'You have to register at least one activity.';} elseif(!isset($_POST['TermsAndConditions'])){ echo 'You have to agree all Terms and Conditions of Elite Brigade.';} else { require_once('database.php'); $query="select * from registration where LoginId='$LoginId'"; $result=mysqli_query($dbc,$query); if(mysqli_num_rows($result)==0) { $checkbox=$_POST['checkbox']; $countCheck=count($_POST['checkbox']); $reg_id=' '; for($i=0;$i<$countCheck;$i++) { $reg_id=$reg_id.$checkbox[$i].','; $query="insert into activity_participation (LoginId,Title,Date) values ('$LoginId','$checkbox[$i]',CURDATE())"; $result=mysqli_query($dbc,$query) or die("Not Connected"); } $query="insert into registration (LoginId,Password,Name,Age,BloodGroup,Sex,Qualification,ContactNumber,Email,Address,AboutYourself,Activity)values ('$LoginId',SHA('$Password1'),'$Name','$Age','$BloodGroup','$Sex','$Qualification','$ContactNumber','$Email','$Address','$AboutYourself',',$reg_id')"; $result=mysqli_query($dbc,$query) or die("Not Connect"); echo ' Dear '.$Name.'.<br>Your request has been mailed to admin.<br>Your account is waiting for approval<br>'; $from= 'Elite Brigade'; $to='ankitp@rsquareonline.com'; $subject='New User Registration'; $message="Dear admin,\n\nA new user request for registration. Please check it out.\n\nRegards\nMicro"; mail($to,$subject,$message,'From:'.$from); //header('Location: index.php'); // header('Location: Registration.php'); } else { echo 'Dear '.$Name. ', <br> An account already exist with login-id<b> '.$LoginId.'</b> <br>Please try another login-id'; }} } ?> <html> <head> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript"> function lengthRestriction(elem, min, max){ var uInput = elem.value; if(uInput.length >= min && uInput.length <= max){ return true; }else{ alert("Please enter between " +min+ " and " +max+ " characters"); elem.value=""; return false; } } function emailValidator(elem, helperMsg){ var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/; if(elem.value.match(emailExp)){ return true; }else{ alert(helperMsg); elem.value=""; return false; } } </script> </head> <body> <?php echo $error_msg; ?> <form action='<?php echo $_SERVER['PHP_SELF'];?>' id="commentForm" method='post'> <div class="registration_and_activity"> <table border="0" cellspacing="0" cellpadding="0" width="380"> <tr><td colspan="2"> <br/><h3>New User?</h3></td></tr> <tr><td width="120"> <em>*</em>Enter Login id</td><td width="150"><input type='text' name='LoginId' id='LoginId' value='<?php if(!empty($LoginId))echo $LoginId;?>' onblur="lengthRestriction(document.getElementById('LoginId'), 6, 20)")/></td></tr> <tr><td> <em>*</em>Enter Password</td> <td><head> <SCRIPT language=Javascript> function capLock(e){ kc = e.keyCode?e.keyCode:e.which; sk = e.shiftKey?e.shiftKey:((kc == 16)?true:false); if(((kc >= 65 && kc <= 90) && !sk)||((kc >= 97 && kc <= 122) && sk)) { if(document.getElementById('Password1').value=='') alert("Caps Lock is On"); } else document.getElementById('divMayus').style.visibility = 'hidden'; } </SCRIPT> </HEAD> <input onkeypress='return capLock(event)' type='password' name='Password1' id="Password1" value='<?php if(!empty($Password1))echo $Password1;?>' onblur="lengthRestriction(document.getElementById('Password1'), 4, 50)")/></td></tr> <tr><td> <em>*</em>Confirm Password</td><td><input type='password' name='Password2' value='<?php if(!empty($Password2))echo $Password2;?>' /></td></tr> <tr><td width="120"> <em>*</em>Enter Name</td> <td><input type='text' name='Name' Id="Name" value='<?php if(!empty($Name))echo $Name;?>' onblur="lengthRestriction(document.getElementById('Name'), 2, 30)")/></td></tr> <tr><td> <em>*</em>Enter Age</td><HEAD> <SCRIPT language=Javascript> function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } </SCRIPT> </HEAD> <td><INPUT onkeypress='return isNumberKey(event)' type='text' name='Age' value='<?php if(!empty($Age))echo $Age;?>'/></td></tr> <tr><td> <em>*</em>Enter Blood</td><td><input type='text' name='BloodGroup' value='<?php if(!empty($BloodGroup))echo $BloodGroup;?>' id="BloodGroup" onblur="lengthRestriction(document.getElementById('BloodGroup'), 1, 3)") /></td></tr> <tr><td> <em>*</em>Enter Sex</td><td><input type='radio' name='Sex' style='width:16px; border:0;' value='Male'<?php if(isset($_POST['Sex'])) { echo "checked='checked'";} ?> />Male <input type='radio' name='Sex' style='width:16px; border:0;' value='Female' <?php if(isset($_POST['Sex'])) { echo "checked='checked'";} ?> />Female</td></tr> <tr><td> <em>*</em>Enter Qualification</td><td><input type='text' name='Qualification' value='<?php if(!empty($Qualification))echo $Qualification;?>' id="Qualification" onblur="lengthRestriction(document.getElementById('Qualification'), 3, 60)"/></td></tr> <tr><td> <em>*</em>Contact Number </td><td><input onkeypress='return isNumberKey(event)'type='text' name='ContactNumber' value='<?php if(!empty($ContactNumber))echo $ContactNumber;?>' /></td></tr> <tr><td> <em>*</em>Enter Email</td><td><input type='text' name='Email'class="email" value='<?php if(!empty($Email))echo $Email;?>' id="emailer" onblur="emailValidator(document.getElementById('emailer'), 'Not a Valid Email')"/></td></tr> <tr><td> <em>*</em>Enter Address</td><td><input type='text' name='Address' value='<?php if(!empty($Address))echo $Address;?>' id="Address" onblur="lengthRestriction(document.getElementById('Address'), 2, 100)")/></td></tr> <tr ><td > <em>*</em>About Yourself </td></tr> <tr><td colspan="2"><textarea rows='10' cols='40' name='AboutYourself' id="AboutYourself" onblur="lengthRestriction(document.getElementById('AboutYourself'), 5, 500)") /><?php if(!empty($Address))echo $Address;?></textarea></td></tr> <tr><td> <?php echo" <tr><td colspan='2'><em>*</em><b>Select fields for which you want to register</b></td></tr>"; require_once('database.php'); $query="select * from activity"; $result=mysqli_query($dbc,$query); while($row=mysqli_fetch_array($result)){ $Title=$row['Title']; $ActivityId=$row['ActivityId']; echo "<tr><td>$Title</td>"; echo "<td><input type='checkbox' name='checkbox[]' value='$Title' style='width:14px; text-align:right;'/></td></tr>";//value=$ActivityId tells ActivityId variable extracts with name="checkbox" echo "<br/>"; } echo " <tr> <table border='0' cellspacing='0' cellpadding='0' width='400' style='margin:10px 0 0 0;'> <td align='left' valign='top' scope='col' width='80'><em>*</em><input type='checkbox' name='TermsAndConditions' style='width:14px; text-align:right;'/></td> <td align='left' valign='top' scope='col'> I agree all <a href='TermsAndConditions.php'>Terms and conditions </a>of Elite Brigade.</td> </table> </tr>"; echo "<tr><td colspan='2' align='center'><input type='submit' value='Register' name='submit' style='background:url(./images/button_img2.png) no-repeat 10px 0px; width:100px; padding:3px 0 10px 0; color:#FEFBC4; border:0; margin:15px 0 5px 100px; '/></td></tr><br>"; echo " </td></tr></table> </div> </form> </body> </html>"; require_once('lower.php'); ?> Hi friends.......... I have two problems with this page....... 1--> When user not select radio button it should displays "Please enter Sex" but on submit it displays an error "Undefined index: Sex in C:\wamp\www\EliteBrigadeserver\RegistrationAndActivity.php on line 19 Please enter Sex." I want to remove this notice........ 2--> If user not fill any field and press submit then if user once selected his sex, it should remain selected. Help me plz............ Anyone????????? Thx in advance...................
  13. Hi Friends..... I want to implement search indexing (like joomla) in my website. Earlier I develop search from database by "select" statement. But for whole website, I don't have any idea to do it............ Plzzzzzzz Help ??????/// I'll highly oblized to you.............
  14. <html><head><script type="text/javascript" src="http://www.google.com/jsapi"></script> <script src="/js/jquery.confirm.js" type="text/javascript"> </script> <script language="javascript"> // load jquery here before calling this $(document).ready(function() { // delete the entry once we have confirmed that it should be deleted $('.delete').click(function() { var parent = $(this).closest('tr'); $.ajax({ type: 'get', url: 'delete.php', // <- replace this with your url here data: 'ajax=1&#038;delete=' + $(this).attr('id'), beforeSend: function() { parent.animate({'backgroundColor':'#fb6c6c'},300); }, success: function() { parent.fadeOut(300,function() { parent.remove(); }); } }); }); // confirm that it should be deleted $('.delete').confirm({ msg:'Do you really want to delete this?', timeout:3000 }); }); </script></head></html> <?php require_once('upper.php'); if(isset($_COOKIE['AdminCookie'])){ require_once('database.php'); $query="select * from events "; $result=mysqli_query($dbc,$query) or die('Not Connected'); while($row=mysqli_fetch_array($result)){ echo "<div id='delete'>"; echo "<a href='EventsDeleted.php?EventId=".$row['EventId']."'>".$row['Title']."</a><br><br>"; echo "<br></div>"; } echo "<a href='log_out.php'>Admin Log out</a><br>"; echo "<a href='AdminHome.php'>Back to Admin Home</a>"; } else{echo 'Sorry, This page is restricted.';} require_once('lower.php'); In above code I want that when admin delete any event, there should an warning message prompt but my jquery not works.......... Plz help.................
  15. <?php require_once('database.php'); require_once('upper.php'); $LoginId=$_COOKIE['LoginIdCookie']; $query="SELECT * FROM registration WHERE LoginId='$LoginId'"; $result=mysqli_query($dbc,$query) or die('Not Connected'); $row=mysqli_fetch_array($result); if(isset($_COOKIE['LoginIdCookie'])) { setcookie('LoginIdCookie',$row['LoginId'],time()-3600); echo 'Log'; } else { setcookie('AdminCookie','A',time()-3600); } //$home_url='http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/LoginValidator.php'; //header('Location: LoginValidator.php'); echo "You are logged out successfully.<br><br>"; echo $LoginId; //echo "<a href='index1.php'>Back to Home</a>"; require_once('lower.php'); ?> HI friends......... By above code I m not logged out even it displays "You are logged out successfully"..... After click on back button I can do everything..... So plz tell me where I am wrong????? Anyone plzzzzzzzzzz/////
×
×
  • 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.