php coding for sql

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • loveme
    replied
    Originally posted by kevk3v View Post
    Attach the file

    Here I attach the sample file in .zip (contains images folder,excel file)
    Attached Files

    Leave a comment:


  • kevk3v
    replied
    Not that one, the excel file lol do you have to use smarty?

    Leave a comment:


  • loveme
    replied
    Originally posted by kevk3v View Post
    Attach the file
    Here the file attached. Sorry for the delay. I'm out of station. Sorry once again
    Attached Files

    Leave a comment:


  • something else
    replied
    echo '<img src="images/'.$name.'.jpg" alt=""/><br/>';

    Leave a comment:


  • kevk3v
    replied
    Attach the file

    Leave a comment:


  • loveme
    replied
    Originally posted by something else View Post
    Have you attempted scripting this yourself?


    I tried like this for data... but I struck in photos.. How do I connect them with sql and how do relate with my db table... please guide Me... and thank 4 for your reply..

    My searc.php code

    PHP Code:
    <?php
    $hostname_php_result_conn 
    = "localhost";
    $database_php_result_conn = "trail";
    $username_php_result_conn = "test";
    $password_php_result_conn = "test123";   
    $php_result_conn = mysql_connect($hostname_php_result_conn, $username_php_result_conn, $password_php_result_conn);
    mysql_select_db($database_php_result_conn,$php_result_conn);

    if(isset(
    $_POST['submit'])) {
       
    $roll_no = $_POST['roll_no'];
       
       
    $sql1 = mysql_query("SELECT Sl FROM marks WHERE Sl = $roll_no");
       
    $row1 = mysql_num_rows($sql1);
       
       if(
    $row1 == 0) {
          echo 
    'Error, ID does not exist';
       } else {

    $sql1 = mysql_query("SELECT * FROM marks WHERE Sl = $roll_no");
    $row1 = mysql_fetch_array($sql1);
    $name = $row1['Name'];
    $sex = $row1['Sex'];
    $age = $row1['Age'];

    echo 
    'Name = '.$name.'<br />
    Sex = '
    .$sex'<br />
    Age = '
    .$age;


    echo
    '<form>
    <input type="button" value="Print Page" onClick="window.print();">
    </form>'
    ;
       }   
    } else {
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Search</title>
    </head>
    <body>

    <form action="searc.php" method="post">
    <input name="roll_no" type="text" id="roll_no" />
    <input type="submit" name="submit" value="search" />
    </form>
    </body>
    </html>

    <?php
    }
    ?>

    Leave a comment:


  • something else
    replied
    Have you attempted scripting this yourself?

    Leave a comment:


  • loveme
    started a topic php coding for sql

    php coding for sql

    HI.... I have a excel file with five coumns named as Sl..No Name ,Age, Sex, and Photo...
    In the columns of Sl.No,Name,Age,Sex have datas and the photos in separate folder named as "photos" with each file named as "Name" ...

    Here I want a page like in A4 size print with print button:


    Sl.No: (drop down box with list of Sl.No)

    Name :

    Age :

    Sex: Photo: (here the particular photo)


    Print


    I hope , I made it understand to you... Thank You ...
Working...
X