Jump to content

yeakyau

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

yeakyau's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok work but how to put echo ur users id not in database >.< once i put get an error . unexpected end. i'm trying to put this if($result){ echo "Successful"; echo "<BR>"; echo "<a href='home.php'>go to home</a>"; } else { echo "users id not found in database"; } ?> i get an error unexpected end -.-"
  2. i just wan if the users ID detected in database only able to make update to the details, if don't have in the database, will echo out invalid, users id.
  3. <?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="members"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $userid=$_POST['userid']; $password=$_POST['password']; $name=$_POST['name']; $lastname=$_POST['lastname']; $email=$_POST['email']; $gender=$_POST['gender']; $address=$_POST['address']; $country=$_POST['country']; // update data in mysql database $sql="UPDATE $tbl_name SET password='$password', name='$name', lastname='$lastname', email='$email', gender='$gender', address='$address', country='$country' WHERE userid='$userid'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $ic and $password, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("userid"); session_register("password"); header("location:home.php"); } else { echo '<script type="text/javascript"> alert("Provide Wrong Username Or Password , Please TrY Again!!!"); window.location.href = "index.php"; </script>'; } ?> anyone pls help why it's get eRror on line 28. it said warning myswl_num_row (): supplied argument is not a valid mysql_ results resource inline 28
  4. <?php // load the configuration file. include("config.php"); //load all news from the database and then OREDER them by newsid //you will notice that newlly added news will appeare first. //also you can OREDER by (dtime) instaed of (news id) $result = mysql_query("SELECT * FROM news ORDER BY newsid DESC",$connect); //lets make a loop and get all news from the database while($myrow = mysql_fetch_assoc($result)) {//begin of loop //now print the results: echo "<b>Title: "; echo $myrow['title']; echo "</b><br>On: <i>"; echo $myrow['dtime']; echo "</i><hr align=left width=160>"; echo $myrow['text1']; // Now print the options to (Read,Edit & Delete the news) echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a> || <a href=\"edit_news.php?newsid=$myrow[newsid]\">Edit</a> || <a href=\"delete_news.php?newsid=$myrow[newsid]\">Delete</a><br><hr>"; }//end of loop ?> After i remove echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a> || <a href=\"edit_news.php?newsid=$myrow[newsid]\">Edit</a> || <a href=\"delete_news.php?newsid=$myrow[newsid]\">Delete</a><br><hr>"; }//end of loop the edit and delete part it become error may i knw is there any method to remove it wihout showing that 2
  5. helo sir u still there? i got one more problem <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <!-- #BeginTemplate "../master.dwt" --> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <!-- #BeginEditable "doctitle" --> <title></title> <!-- #EndEditable --> <link href="../styles/style1.css" media="screen" rel="stylesheet" title="CSS" type="text/css" /> </head> <body> <!-- Begin Container --> <div id="container"> <!-- Begin Masthead --> <div id="masthead"> <h1>WELCOME TO IICP ALUMNI WEB PORTAL~</h1> <h3>BY: IICP MEMBERS</h3> </div> <!-- End Masthead --> <!-- Begin Navigation --> <div id="navigation"> <ul> <li><a href="../../index.php">Home</a></li> <li><a href="http://www.alumni-inti.co.cc/register.php">Register</a></li> <li><a href="http://www.alumni-inti.co.cc/news.php">News/Notice Board</a></li> <li><a href="http://www.alumni-inti.co.cc/jobseeker.php">JobSeeker</a></li> <li><a href="../photo_gallery/default.html">Photo Gallery</a></li> <li><a href="../information_links/default.html">Links</a></li> <li><a href="../faq/default.html">Forum</a></li> <li><a href="http://www.alumni-inti.co.cc/contact.php">Contact</a></li> </ul> </div> <!-- End Navigation --> <!-- Begin Content --> <div id="content"> <!-- #BeginEditable "content" --> <?php include("config.php"); $result= mysql_query("SELECT*FROM news ORDER BY newsid DESC",$connect); //lets make a loop and get all news from the database while($myrow = mysql_fetch_assoc(results)) { echo "<b>Title:"; echo $myrow['title']; echo "</b><br><On: <i>"; echo $myrow['dtime']; echo "</li><hr align=left width=160>"; echo $myrow['text1']; echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a> } <title>News</title> <h2>News</h2> <p>INTI'S OPEN DAY</p> <p>World-Class Higher Education As one of the pioneers in the Malaysian higher education sector, the INTI Education Group has carved a niche based on its quality programmes, global alliances, commitment to excellence and uncompromising academic standards. Every INTI student has benefited from the Group's expansion and commitment to globalisation and today, there are some 55,000 alumni from Malaysia and 50 other countries across the globe, all proudly waving the INTI flag. </p> <table width="400" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td><strong>Comment Book </strong></td> </tr> </table> <table width="400" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form id="form1" name="form1" method="post" action="addguestbook.php"> <td> <table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td width="117">Name</td> <td width="14">:</td> <td width="357"><input name="name" type="text" id="name" size="40" /></td> </tr> <tr> <td>Email</td> <td>:</td> <td><input name="email" type="text" id="email" size="40" /></td> </tr> <tr> <td valign="top">Comment</td> <td valign="top">:</td> <td><textarea name="comment" cols="40" rows="3" id="comment"></textarea></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit" /> <input type="reset" name="Submit2" value="Reset" /></td> </tr> </table> </td> </form> </tr> </table> <table width="400" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td><strong><a href="commentbook.php">Comment BOOK</a> </strong></td> </tr> </table> <h3>Notice BOard</h3> <ul> <li><span class="style_bold">Malacca TripS~ Pls Contact: Doblue A Phone:0125555235</span><br /> <span class="style_italic">Visit INTEL FactorY~</span><br /> </li> <li><span class="style_bold">Beach Party</span><br /> <span class="style_italic">LOCATE AT Batu Ferringi</span><br /> </li> <li><span class="style_bold">Last years Event.. INTI NITE~</span><br /> <span class="style_italic">INternational NITE~</span><br /> C\</li> </ul> ?> <!-- #EndEditable "content" --></div> <!-- End Content --> <!-- Begin Footer --> <div id="footer"> <p><a href="../../index.php">Home</a> | <a href="http://www.alumni-inti.co.cc/register.php">Register</a> | <a href="http://www.alumni-inti.co.cc.news.php">News/Notice Board</a> | <a href="http://www.alumni-inti.co.cc/jobseeker.php"> JobSeeker</a> | <a href="../photo_gallery/default.html">Photo Gallery</a> | <a href="../information_links/default.html">Links</a> | <a href="/default.html">FAQ</a> | <a href="../contact/default.html">Contact</a></p> </div> <!-- End Footer --></div> <!-- End Container --> </body> <!-- #EndTemplate --> </html> after i adding a php code inside this web , it getting errors >.< if remove no erros may i knw why
  6. oic~ is there anyways to pull out users information into the pages once they login will diplsay the detail.
  7. halo sir i got the answer td width="294"><input name"ic" type="text" id="ic"></td> i didn't put input anme="ic" however after i put still the same using the command to echo out. than i change the ic to userid. now it's work thank you very much~ by the wait u mean what kind of seassion should i put in everpages . Tq
  8. the results is dispaly password ->12345 no display IC: 850905075287
  9. now i need to add back the php pages? and include this code it is
  10. sir, is there any solutions. :'(
  11. i enter 850905075287 than password 12345
  12. ok already take out, once click submit it display out password no ic.
  13. only IC is blank not show out once echo . and password is show
×
×
  • 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.