Jump to content

chokies12

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chokies12's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. o thanks my fault i dont read that much..thanks dude
  2. here's my code i doesnt delete anything from the database <html> <head> <title>Select</title> </head> <body> <form name="form1" method="post" action="select.php"> <table width="537" border="0"> <tr> <th width="1" scope="row"> </th> <td width="126"> </td> <td width="300"> </td> <td width="92"> </td> </tr> <tr> <th scope="row"> </th> <td>Enter Lastname: </td> <td><label> <input name="keyword" type="text" id="keyword" size="50"> </label></td> <td><input name="submit" type="submit" id="submit" value="Search"></td> </tr> <tr> <th scope="row"> </th> <td> </td> <td><label></label></td> <td> </td> </tr> </table> </form> <table border="1"> <div align="center"></div> <tr> <th>LastName</th> <th>FirstName</th> <th>MiddleName</th> <th>Action</th> </tr> </body> </html> <?php include('inc/function.php'); extract($_POST); if(isset($submit)) { //$keyword = strtolower($keyword); $result = mysql_query("SELECT * FROM student_applicant_information WHERE ppd_lastname='$keyword'"); if(mysql_num_rows($result)){ while($rs = mysql_fetch_array($result)){ $studID = $rs[0]; $lastname = $rs[2]; $firstname = $rs[3]; $midname = $rs[4]; echo "<tr>"; echo "<td>$lastname</td>"; echo "<td>$firstname</td>"; echo "<td>$midname</td>"; echo "<td><a href='select.php?a=delete&id=$studID'>Delete</a> <a href='select.php?a=edit&id$studID'>Edit</a></td>"; echo "</tr>"; } } mysql_close($dbConn); echo "</table>"; } if($_GET['a'] == 'delete') { $id = $_GET['id']; $sql = "DELETE * FROM student_applicant_information WHERE stud_applicant_id=$id"; $result = mysql_query($sql); } if($_GET['a'] == 'eidt') { echo "hello world"; } ?>
  3. i think its short_open_tags something like that
  4. Hi i only have 1 table for category and the problem is this is already as is i just have to make indention for sub categories. Im just doing some updates and i not familiar with its structures im still a newbie
  5. for much easier debuggin why dont you separate your html codes from your php codes. <?php session_start(); extract($_POST); // extract $_POST array so you wont be type $_POST always $_SESSION['test1']=$test1; ?> <html> <head> </head> <body> <form name="form1" method="POST" action="interface.php" style="margin:0px"> <input name="test1" value="test1" type="text" style="position:absolute;width:200px;left:18px;top:108px;z-index:0"> <input name="formbutton1" type="submit" value="next" style="position:absolute;left:72px;top:202px;z-index:1"> </form> </body> </html>
  6. hi need some help i dont know how to do this. i have list that shows my category items what i want to do know is to have and indent if that item is a sub category can someone help me..thx here's part of my code <table width="80%" cellpadding="2" cellspacing="2"> <tr> <td class="listhd" width="25">#</td> <td class="listhd" width="50">Actions</td> <td class="listhd">Category Name</td> <td class="listhd" width="50" align="center">Order </td> </tr> <?php $n_record_counter=1; foreach($result_fields as $v){ $s_bgColor=($n_record_counter%2) ? '#FFFFFF' : '#EFEFEF'; ?> <tr bgcolor="<?=$s_bgColor?>"> <td > <?=$n_record_counter++;?>.</td> <td > <a href="?a=categories&action=edit&id=<?=$v['id']?>"> <img src="images/icon_edit16x16.gif" /></a> <a href="?a=categories&action=delete&id=<?=$v['id']?>"> <img src="images/icon_delete16x16.gif" /></a> </td> <td class="rowGreen"> <?=$v['name']?> </td> <td align="center"> <?=$v['ordseqn']?></td> </tr> <?php } ?> </table>
  7. $ftp_path = 'videouploads/'; try this $ftp_path = '/videouploads/';
  8. passwords should be encrypted so the main idea is generate and email and temporary code then a link. upon click the link $_GET the temporary code which you include in the url then if verified in the database show a change password form for much tighter security
  9. post your code there's something wrong with your directory
  10. what i did was just put a session_destroy(); in top of my login page. i think my logout page has problems doesnt unset the value even if i put unser() .. i did is when you press logout redirect the script to login page and will trigger the destroy part so it will not unset any value from my session variable.
  11. <?php include 'dbconnect.php'; function pb_stng_selectall($users) { $query = "SELECT * FROM users='$users'"; $result = mysql_query($query) or die(mysql_error()); $stng = mysql_fetch_array($result) or die(mysql_error()); echo = $stng['users']; } ?> <?php pb_stng_selectall(); ?>
×
×
  • 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.