Jump to content

mikebyrne

Members
  • Posts

    780
  • Joined

  • Last visited

Posts posted by mikebyrne

  1. LOL sorry. Doing two things at once here

     

    I want everything underneath each other at the moment the two drop down list are on the left hand side

     

    Username

    Age

    Location

    Position applying for (listbox)

    Why

    Do you work for a chatsite (listbox)

    if so, who?

     

    At present the listboxs are in the top left

     

    (I know its nothing to do with php!! lol)

  2. Hi guys,

     

    Im doing a page for a friend but there is dropdown menus so im not sure how to set them as varibles. Here my work so far:

     

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <td><form name="form1" method="post" action="signupsnake.php">
      <table align="center">
        <tr valign="baseline">
          <td nowrap align="right">Name:</td>
          <td><input type="text" name="name" value="" size="32"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Age:</td>
          <td><input type="number" name="Age" value="" size="32"></td>
        </tr>
        <tr valign="baseline">
          <td nowrap align="right">Location:</td>
          <td><input type="text" name="Location" value="" size="32"></td>
        </tr>
    <select name="mydropdown1" size="1">
          <option value="Option">Please Select Option</option>
          <option value="Help Operator">Help Operator</option>
          <option value="Moderator">Moderator</option>
          <option value="Senior Moderator">Senior Moderator</option>
          <option value="IRCop">IRCop</option>
          <option value="Administrator">Administrator</option>
        </select>
        /tr>
        <tr valign="baseline">
          <td nowrap align="right">Reason for Application:</td>
          <td><input type="text" name="Reason" value="" size="32"></td>
        </tr>
        <select name="mydropdown2" size="1">
          <option value="Option">Do you work for any chatsite?</option>
          <option value="YES">YES</option>
          <option value="NO">NO</option>
          <tr valign="baseline">
          <td nowrap align="right">If so, Which one?:</td>
          <td><input type="text" name="which" value="" size="32"></td>
        </tr>
          
          <td><input type="submit" value="Apply"></td>
        </tr>
      </table>
    </form>
    <p> </p>
    </body>
    </html> 
    

     

    If you can tell me how to put the listbox in line that would be great!!!

     

    <?php
    include('config1.php');
    
    // table name
    $tbl_name=applications;
    
    
    // values sent from form
    $name=$_POST['Username'];
    $Age=$_POST['Age'];
    $Location=$_POST['Location'];
    $mydropdown1=$_POST['Position'];
    $Reason=$_POST['Reason'];
    $mydropdown2=$_POST['Workonsite'];
    $which=$_POST['Whatsite'];
    
    
    
    // Insert data into database
    $sql="INSERT INTO $tbl_name(Username,Age,Location,Position,Reason,Workonsite,Whatsite)VALUES('$Username', '$Age', '$Location', '$Position', '$Reason','$Workonsite', '$Whatsite')";
    $result=mysql_query($sql)or die(mysql_error());
    
    ?>
    

     

    Plus the SQL of database

     

    CREATE TABLE `applications` (

      `Userid` int(11) NOT NULL auto_increment,

      `Username` int(11) default NULL,

      `Age` int(11) default NULL,

      `Location` int(11) default NULL,

      `Position` int(11) default NULL,

      `Reason` int(11) default NULL,

      `Workonsite` int(11) default NULL,

      `Whatsite` int(11) default NULL,

      PRIMARY KEY  (`Userid`)

    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci

     

     

  3. I've just started my Admin page and have seen an example I like

     

    http://www.btrax.com/includes/sample_admin/eng/order/new.php

     

    Now, i've done my template but was wondering how would I produce a table in the middle of my page like the example??

     

    Here's my template

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:1105px;
    height:817px;
    z-index:1;
    left: 5px;
    top: -158px;
    }
    #Layer2 {
    position:absolute;
    width:916px;
    height:534px;
    z-index:1;
    top: 260px;
    left: 177px;
    background-color: #CCCCCC;
    }
    #Layer3 {
    position:absolute;
    width:895px;
    height:511px;
    z-index:2;
    left: 185px;
    top: 275px;
    background-color: #FFFFFF;
    }
    #Layer4 {
    position:absolute;
    width:942px;
    height:128px;
    z-index:2;
    left: 182px;
    top: 105px;
    }
    -->
    </style>
    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
    </head>
    
    <body bgcolor="#FFFFFF">
    <div id="Layer1">
      <div id="Layer2"></div>
      <img src="/grey.jpg" width="130" height="805" />
      <div id="Layer4">
        <p> </p>
        <p> 			</p>
        <p>------Oders-------Sales-------Items-------Shipping-------</p>
        <p> </p>
      </div>
      <hr />
      <div id="Layer3">
        <label></label>
      </div>
    </div>
    </body>
    </html>
    

  4. I've just started my Admin page and have seen an example I like

     

    http://www.btrax.com/includes/sample_admin/eng/order/new.php

     

    Now, i've done my template but was wondering how would I produce a table in the middle of my page like the example??

     

    Here's my template

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:1105px;
    height:817px;
    z-index:1;
    left: 5px;
    top: -158px;
    }
    #Layer2 {
    position:absolute;
    width:916px;
    height:534px;
    z-index:1;
    top: 260px;
    left: 177px;
    background-color: #CCCCCC;
    }
    #Layer3 {
    position:absolute;
    width:895px;
    height:511px;
    z-index:2;
    left: 185px;
    top: 275px;
    background-color: #FFFFFF;
    }
    #Layer4 {
    position:absolute;
    width:942px;
    height:128px;
    z-index:2;
    left: 182px;
    top: 105px;
    }
    -->
    </style>
    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
    </head>
    
    <body bgcolor="#FFFFFF">
    <div id="Layer1">
      <div id="Layer2"></div>
      <img src="/grey.jpg" width="130" height="805" />
      <div id="Layer4">
        <p> </p>
        <p> 			</p>
        <p>------Oders-------Sales-------Items-------Shipping-------</p>
        <p> </p>
      </div>
      <hr />
      <div id="Layer3">
        <label></label>
      </div>
    </div>
    </body>
    </html>
    

  5. the sql for the table is:

     

    CREATE TABLE `users` (

      `id` int(4) NOT NULL auto_increment,

      `name` varchar(65) NOT NULL default '',

      `address` varchar(65) NOT NULL default '',

      `address1` varchar(65) NOT NULL default '',

      `address2` varchar(65) NOT NULL default '',

      `address3` varchar(65) NOT NULL default '',

      `address4` varchar(65) NOT NULL default '',

      `county` varchar(25) NOT NULL default '',

      `zip` varchar(65) NOT NULL default '',

      `telephone` varchar(25) NOT NULL default '',

      `email` varchar(25) NOT NULL default '',

      `username` varchar(65) NOT NULL default '',

      `password` varchar(15) NOT NULL default '',

      `User` int(1) default '0',

      PRIMARY KEY  (`id`)

    ) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=latin1;

     

    The users field will always be 0 and any additional entry from the confirmation email wiil have a 1 in the users column

     

    So 1= Users 0=Admin

     

    Therefor when a user logs in they will have 1 in the user column and when an admin logs in they will have a 0 in the users column

     

     

×
×
  • 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.