html/php

Discussion in 'PHP' started by ataloss, Dec 20, 2013.

  1. #1
    Merry Christmas. i'm trying to code up a dark figured page with input boxes
    with values in them which will be displaced with user input. You guys have
    been great helping with my pastime and I hope will now. I'm including my
    feeble attempt below:
    
    <html><body background="oldorchard.jpg "bgcolor="#ccffff"><b><center>
    <?php
    // echo "date("m/d/Y");
    
    <input type=text size=25 value="Invoice<? echo '$acctno'?></b><br />";
    
    /****** I think the above line is closest to being the right code ******/
    
    echo "Invoice No: $acctno</b><br />";
    include ('getpercent');
    // error_reporting(E_ALL ^ E_NOTICE);
    error_reporting(0)
    $result=mysql_query($query);
    $num=mysql_numrows($result);
    while($row = mysql_fetch_array($result))
    {
    mysql_select_db('homedb') or die( "Unable to select database");
    $query="SELECT  * FROM oocust WHERE payrec = 'R' && pd = ' '";
    $result=mysql_query($query);
    $num=mysql_numrows($result);
    echo date('m/d/y');
    $result=mysql_query($query);
    if(mysql_num_rows($result)) 
       {
    while(list($acctno, $orderno, $bname, $bstreet,
    $bcity, $bstate, $bzip,  $sname, $sstreet, $scity,
    $sstate, $szip, $terms, $fob, $descr, $charges,  $tax, $amtdue)= mysql_fetch_row($result))
       {
    <TABLE BORDER="1" CELLPADDING="10" CELLSPACING="10">
           <TD>
    <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="3">
           <TD>
    <TABLE BORDER="1" CELLPADDING="1" CELLSPACING="1">
      
    <td><input type=text size=25 value="Bill To:"><br>
    
    
    /***** below another attempt *****/
          <input type=text size=25 value="$bname"><br>
    
          <input type=text size=25 value="$bname"><br>
      <input type=text size=25 value="$bstreet:">><br>
          <input type=text size=25 value="$bcity"><br>
         <input type=text size=25 value="$bstate"><br>
           <input type=text size=25 value="$bzip"></TD><p>
         <td>
    <input type=text size=25 value="Ship To:"><br>   
    <input type=text size=25 value="$sname:"><br>
    <input type=text size=25 value="$street"><br>
      <input type=text size=25 value="$scity"><br>
    <input type=text size=25 value="$sstate"><br>
       <input type=text size=25 value="$szip"><p></TD>   
          <tr>
        <td>
         <input type=text size=25 value="Terms: $terms"><br>
    <input type=text size=25 value="Due Date: $duedate"><br>
    <input type=text size=25 value="Order No: $orderno"></TD>
          <TD>
    <img src="dave pic.jpg" width=250 height=350></td>
    }
    }
    }
    ?>
       </b></BODY></HTML>
    
    
    
    Code (markup):

     
    ataloss, Dec 20, 2013 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    What is the problem you are having?
     
    NetStar, Dec 20, 2013 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Well, can't quite figure out what you're asking... but a good first step before diving into PHP like that might be to actually learn some HTML, preferably from a source more modern than 1997... Since you've got tables for nothing, invalid table nesting, unclosed tags, values doing label's job, attributes like background and bgcolor with tags like center that have no business in any code written the past decade and a half, inline level tags wrapping block-level, etc, etc...

    In fact, and sorry if this sounds harsh, but forget everything you THINK you know about HTML and PHP, and start over learning from scratch.

    ... and that's before talking the outdated and soon to disappear mysql_ functions, wasting memory making copies of a perfectly good array's value with list, so on and so forth.

    Pretty much not sure what you're trying to do, but that's not how you do it. Whatever source you are learning from should have been discarded over a decade ago!
     
    deathshadow, Dec 21, 2013 IP
  4. ataloss

    ataloss Active Member

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #4
    thank you, just what I needed to know
     
    ataloss, Dec 21, 2013 IP