Jump to content

shortkid422

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Posts posted by shortkid422

  1. I think that the table needs to be in quotes.

    [php:1:18aecfb026]<?php

     

    if(mysql_list_tables($dbname) != news){

    CREATE TABLE \'news\' (

    author VARCHAR(30) NOT NUUL,

    dateposted DATETIME NOT NULL,

    title VARCHAR(100) NOT NULL,

    content CHAR(99999) NOT NULL,

    ) }

    ?>[/php:1:18aecfb026]

  2. i got it fixed, somewhat. There needed to be a space by the user( part. But one problem that im having is the values are not being passed by the form. Here it is:

    
    <?php
    
     session_start(); 
    
    ?>
    
    <form action="register_member.php" method="post">
    
    <table>
    
    <tr>
    
     <td>Please enter your desired username here:</td><td><input type="text" name="" value="<?php echo $username ?>"></td>
    
    </tr>
    
    <tr>
    
     <td>Enter your password that will be used:</td><td><input type="text" name="" value="<?php echo $user_password1 ?>"></td>
    
    </tr>
    
    <tr>
    
     <td>Please re-enter your password again:</td><td><input type="text" name="" value="<?php echo $user_password2 ?>"></td>
    
    </tr>
    
    <tr>
    
     <td>Now please enter your valid email address:</td><td><input type="text" name="" value="<?php echo $email ?>"></td>
    
    </tr>
    
    <tr>
    
     <td><input type="submit" value="Register!"></td><td><input type="reset" value="Clear"></td>
    
    </tr>
    
    </table>
    
    </form>
    
    

  3. Im having a problem with this query, can someone help me out?

    
    $query1 = "INSERT INTO user(username, userpassword, email) VALUES(\'$username\',\'$userpassword\',\'$email\')";
    
    $result1 = mysql_query($query1)
    
    or die(mysql_error());
    
    

  4. Why wont the $price get echoed like i want it to when I select it?

    
    <?  
    
     include("misc.inc");
    
     $connection = mysql_connect($host,$user,$password)
    
          or die ("couldn\'t connect to server");
    
     $db = mysql_select_db($database,$connection)
    
          or die ("Couldn\'t select database");
    
    
    
     $query = "SELECT * FROM flights ORDER BY \'price\'";
    
     $result = mysql_query($query)
    
          or die ("Couldn\'t execute query.");
    
          
    
     echo "$price <br>";
    
    ?>
    
    

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