Search Results

Search found 81 results on 4 pages for 'user225269'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • How to separate date in php

    - by user225269
    I want to be able to separate the birthday from the mysql data into day, year and month. Using the 3 textbox in html. How do I separate it? I'm trying to think of what can I do with the code below to show the result that I want: Here's the html form with the php code: $idnum = mysql_real_escape_string($_POST['idnum']); mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$idnum'"); $month = mysql_real_escape_string($_POST['mm']); ?> <?php while ( $row = mysql_fetch_array($result) ) { ?> <tr> <td width="30" height="35"><font size="2">Month:</td> <td width="30"><input name="mo" type="text" id="mo" onkeypress="return handleEnter(this, event)" value="<?php echo $month = explode("-",$row['BIRTHDAY']);?>"> As you can see the column is the mysql database is called BIRTHDAY. With this format: YYYY-MM-DD How do I do it. So that the data from the single column will be divided into three parts? Please help thanks,

    Read the article

  • How do I simplify this php script

    - by user225269
    Any suggestions on how I can simplify the php script below?This was my previous question: http://stackoverflow.com/questions/2712237/how-to-check-if-a-checkbox-radio-button-is-checked-in-php that is linked to this one, What I'm trying to do here is to output the data depending on the checkbox that is checked. But my code isn't really good, it shows 2 tables if the condition is met by the 2 results. As you can see in the code below, any suggestions on how I can simplify this? <?php $con = mysql_connect("localhost","root","nitoryolai123$%^"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("school", $con); $id = mysql_real_escape_string($_POST['idnum']); if ( $_POST['yr'] == 'year' and $_POST['sec'] == 'section' ){ $result2 = mysql_query("SELECT * FROM student WHERE IDNO='$id'"); echo "<table border='1'> <tr> <th>IDNO</th> <th>YEAR</th> <th>SECTION</th> </tr>"; while($row = mysql_fetch_array($result2)) { echo "<tr>"; echo "<td>" . $row['IDNO'] . "</td>"; echo "<td>" . $row['YEAR'] . "</td>"; echo "<td>" . $row['SECTION'] . "</td>"; echo "</tr>"; } echo "</table>"; } if ( $_POST['yr'] == 'year' and $_POST['sec'] == 'section' and $_POST['lname'] == 'lastname'){ $result3 = mysql_query("SELECT * FROM student WHERE IDNO='$id'"); echo "<table border='1'> <tr> <th>IDNO</th> <th>YEAR</th> <th>SECTION</th> <th>LASTNAME</th> </tr>"; while($row = mysql_fetch_array($result3)) { echo "<tr>"; echo "<td>" . $row['IDNO'] . "</td>"; echo "<td>" . $row['YEAR'] . "</td>"; echo "<td>" . $row['SECTION'] . "</td>"; echo "<td>" . $row['LASTNAME'] . "</td>"; echo "</tr>"; } echo "</table>"; } mysql_close($con); ?>

    Read the article

  • How to change the elements in the page base on user who is logged in

    - by user225269
    Please give me an idea on how to display elements in a page depending on who is logged in. For example, a user or an administrator. I'm thinking of something like this but I get a parse error, what do I lack in this code?: <?php session_start(); if (!(isset($_SESSION['loginAdmin']) && $_SESSION['loginAdmin'] != '')) { header ("Location: loginam.php"); } if else (!(isset($_SESSION[['loginAdmin']) && $_SESSION['loginAdmin'] =='')) { ?> <?php include('head2.php'); ?> } <?php if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) { header ("Location: login.php"); } if else (!(isset($_SESSION[['login']) && $_SESSION['login'] =='')) { ?> <?php include('head3.php'); } ?> Please help

    Read the article

  • need help on php require

    - by user225269
    What do I need to put in a php code so that the user cannot access it even if he specified the correct url for the page they are trying to access. And redirect it to the logon page. I'm really having difficulty in this matter, everytime I click back button on the browser the user can still access the page

    Read the article

< Previous Page | 1 2 3 4