SitePoint Sponsor

User Tag List

Page 4 of 12 FirstFirst 12345678 ... LastLast
Results 76 to 100 of 295
  1. #76
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't know where that spurious '<' is coming from. Try doing View Source on the form page in your browser and see what the <form> tag looks like when PHP generates the action URL. That might give you a clue.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  2. #77
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    403 Forbidden ...

    Kevin,

    thanks for your reply.

    when i push the send button of this form i will be directed to http://localhost/ost/HTML_Seiten/<?php%20echo%20$_SERVER['PHP_SELF'];%20?> with the above mentioned error message 403 "Forbidden...".

    As far as I know, the $php_self variable should take me to the same form with the form variables forwarded to the form again, right? So i guess it should look like somewhat similar to http://localhost/ost/HTML_Seiten/.....username=somename&password=somepassword,

    when $username and $ password are the form variables.

    Seems to like there is some problem with the php interpreter, which does not detect the php open tag <?php.

    What do you think?

    Regards,

    thomlin
    Last edited by Kevin Yank; Jan 30, 2003 at 15:59.

  3. #78
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Is the form page a file with a .php extension? If not, rename it so your server knows it's a PHP script. If so, there is something wrong with your server configuration.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  4. #79
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kevin,

    I parse the .html-pages through the php interpreter, as well. the file is named formloginpage.shtm. .shtm is just an extension in order to know that it is a server parsed htm-page.

    PHP works properly. Do you see any problems in using $php_self not in the docroot-level but on files, which are saved in different files in the docroot, e.g. htdocs/OST/html_files/formloginpage.shtm?

    thomlin

  5. #80
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You say you're processing .html files as PHP scripts, but are you sure you're parsing .shtm files as PHP scripts? To my knowledge, a single file can't be processed both as a PHP script and for Server-Side Includes without some fairly heavy customization of Apache 2.0 (I don't think it's possible at all in Apache 1.x).

    $PHP_SELF should work fine everywhere, and the symptoms you have described indicate a general failure of the PHP interpreter on the file, not just of $PHP_SELF.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  6. #81
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In that second code I think, note that you mustn't use SESSION after you display html code, at least you can't write session after you send out html code. I am not sure if you can read session though, does anyone know? (please reply)
    But that is at least a problem I saw with your code, there may be others...
    - website

  7. #82
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I found the solution

    Kevin,

    I finally found the solution for my problem. The form I was working with was originally an XHTML-form. I changed this XHTML-form to a php form, but did not delete the xml script definition and the link to the DTD.

    When I deleted those two lines the form and $self_php worked properly.

    Sometimes its just try and error to find the right solutions.

    Thanks anyways for your help.

    thomlin

  8. #83
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    database occurred

    Hiya all

    with this arcticle using the code provided , two thing's have happend to
    i get and error message saying (database is down ) or after i fill out the form and sumit it go to a pop and say a database error occurred in the processing of you submission.If persists contact etc....

    one part of the code i',m not clear on is for the .db file
    function dbConnect($db="")

    and the other part is with .signup

    // Process signup submission
    dbConnect('sessions); what must I place instead of sessions can it just be a name of a current db on the server example: members
    and does this need to be changed in other file for accesscontrol?

    also i do not have access to my php.ini because it on my webhost server

    so in the signup file

    do make the path changes to this part of the code:

    include("common.php");
    include("db.php");

    Example:

    include("host/public/php/common.php");
    include("host/public/php/db.php");

    whould any of the changes help with my error messesges

  9. #84
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You need to change the dbConnect('sessions') line so that it contains the name of the database you want to use on your MySQL server. So if you store all the tables related to access control on your site in a database called 'members', then change the line to say dbConnect('members').

    Since accesscontrol.php is the only file that calls dbConnect(), that's the only place you need to make this change.

    I doubt you'll need to change the include() calls, as long as the files are in the same directory as accesscontrol.php on your server. If they were causing problems, you'd be seeing error messages about them.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  10. #85
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    about the dbConnect('sessions') line

    can this line be but this way
    example:from the accesscontrol.php
    dbConnect('members_mysite_jp') since it's with my webhost
    thats how they tell me to right the path

    also would i need to do this
    for the .db
    example: function dbConnect($db="members_mysite_jp") {

    here the example from my host
    Creating a database
    You can create a maximum of 2 databases if you own a SILVER or higher package. This option allows you to create an entirely new, empty database.

    To create a database, click on the Databases tab from the "Database Manager" page. Select the "Create" option from the "Select" list and choose Database from the second list. Enter the name of the database you want to create and click the "Build SQL Query" button. The detail of SQL query will be displayed at the bottom of the page. After reviewing the detail of SQL query click the "Run SQL Query" button to complete the operation. The results of operation will be displayed at the bottom of the page.

    Your user name is appended to the end of every database name. The Total maximum length is 64 characters long and any "." (dot) or "-" (dash) in the database name is automatically converted to "_" (underscore).

    For example if you choose "customers" as your database name and your domain is mycar.com, the complete database name will be:

    customers_mycar_com

    example 2 from host
    Connecting to your database
    In order to connect to the database you have created, you need the following arguments to include in your application/script:

    MySQL server name (hostname): megasqlservers.com

    Database user name: dbm.yourdomain

    example: dbm.mycar.com

    Password: The password will be the same as your Database Manager password.

    Database name: It will be the complete name of database as outlined in

    man kevin thanks for the first reply sorry for the long thread i'm a new but working hard haahah which new book of your would you recomend ?

  11. #86
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deuce777
    can this line be but this way
    example:from the accesscontrol.php
    dbConnect('members_mysite_jp') since it's with my webhost
    thats how they tell me to right the path
    That will work just fine, yes.
    also would i need to do this
    for the .db
    example: function dbConnect($db="members_mysite_jp") {
    NO! The whole point of providing the database name when you call dbConnect() is so that you don't need to specify it in the db.php file! The code:
    Code:
    function dbConnect($db="") {
    means "create a function named dbConnect that takes a single parameter and stores it in the variable $db. If no value is given for the parameter when the function is called, give it a value of "" (the empty string). You do need to provide your database server's hostname, username and password at the top of db.php, but that's it!
    man kevin thanks for the first reply sorry for the long thread i'm a new but working hard haahah which new book of your would you recomend ?
    I'd recommend the 2nd edition of my "Build Your Own Database Driven Website using PHP and MySQL".
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  12. #87
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so would this work? example:

    $dbhost = "megasqlservers.com";
    $dbuser = "dbm.crazyphp.jp";
    $dbpass = "crazymysql";

    function dbConnect($db="members_crazyphp_jp")

    also can the table use in your lession be used?

  13. #88
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deuce777
    so would this work? example:

    $dbhost = "megasqlservers.com";
    $dbuser = "dbm.crazyphp.jp";
    $dbpass = "crazymysql";

    function dbConnect($db="members_crazyphp_jp")
    I just finished explaining why you should not put your database name in the dbConnect function declaration, but if you insist, you can do it that way. Just make sure to call dbConnect without any parameters in accesscontrol.php.
    also can the table use in your lession be used?
    Once you create it, yes.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  14. #89
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok i got it so it send the e-mail and passwass but still when i go to the signin.php i get wrong user/name and passwords why is this

    which file would correct this?

  15. #90
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by deuce777
    Ok i got it so it send the e-mail and passwass but still when i go to the signin.php i get wrong user/name and passwords why is this

    which file would correct this?
    I would modify accesscontrol.php to print out the database query it is sending to check the username and password against the user table. It may be that the username and password are not being inserted into this query correctly.

    If that is the case, the prime suspect would be that register_globals is disabled on your server. Please see my article, "Write Secure Scripts in PHP 4.2" to learn how to adapt the script to work with this setting.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  16. #91
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can i add more feilds to the signup.php

    hello i looking for help to adding about 8 more sign-up feilds
    how can i do so ,some are required others will not be required,just so the new feild put the text in the databasei have tried many time but no luck but i do have the oringal code working fine,just when i add the new feilds no luck,does the database table must be in the same order as the form feild?after the orginal items starting with id and so on?

  17. #92
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this where i would make the changes?

    Example:to adding new feilds

    $sql = "INSERT INTO profiles SET
    userid = '$newid',
    password = PASSWORD('$newpass'),
    fullname = '$newname',
    email = '$newemail',
    notes = '$newnotes'";<<<want to remove this feild<<<<

    and add this ones: Company Name (not required)
    Address (2 lines needed)
    City
    Province/State
    Country
    Postal Code/Zip
    Phone
    Fax (not required)

    so this what i have been trying

    $sql = "INSERT INTO profiles SET
    userid = '$newid',
    password = PASSWORD('$newpass'),
    fullname = '$newname',
    email = '$newemail',
    Company Name = '$newCompany Name'";
    Address= '$newAddress'";(not sure how to do 2 lines)
    City = '$newCity'";
    Province/State= '$newProvince/State'";
    etc.......
    Example: do I also need to edit this part in the text feild?
    <input City=newCity type=text maxlength=100 size=25>

    also does my table need to be in the exact order that i have above?


    if anyone could help with this it would be wicked

  18. #93
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    In the $sql you can't have ; for separating the different input but you need ,
    Code:
    $sql = "INSERT INTO profiles 
               SET userid = '$newid',
                 password = PASSWORD('$newpass'),
                 fullname = '$newname',
                    email = '$newemail',
             Company Name = '$newCompany Name',
                  Address = '$newAddress',
                     City = '$newCity',
           Province/State = '$newProvince/State'";
    also does my table need to be in the exact order that i have above?
    No.

    HTH

    -Helge

  19. #94
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    Hi,
    In the $sql you can't have ; for separating the different input but you need ,
    Code:
    $sql = "INSERT INTO profiles 
               SET userid = '$newid',
                 password = PASSWORD('$newpass'),
                 fullname = '$newname',
                    email = '$newemail',
             Company Name = '$newCompany Name',
                  Address = '$newAddress',
                     City = '$newCity',
           Province/State = '$newProvince/State'";
    No.

    HTH

    -Helge
    example:
    City = '$newCity
    Company Name = '$newCompany Name

    would this be right ?

  20. #95
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No. Do as I did in my example; That means having single quotes around the PHP variables and separate the different entries with a comma ( , ).
    Note: if the PHP variable is of type integer you should NOT have single quotes around it.

    And you can't have spaces in column names, nor in PHP variable names.

    MySQL: Company Name -> Company_Name
    PHP: $newCompany Name -> $newCompanyName (or $newCompany_Name)

    -Helge

  21. #96
    SitePoint Member Derfel Cadarn's Avatar
    Join Date
    Mar 2003
    Location
    Berlin
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    including files

    Hi everyone,
    I'm new here and rather new in PHP/MySQL. I've read Kevins' article a while ago and started experimenting. Now I've encountered a problem which I don't understand yet. I've tried the original script, but there I got the login-page everytime again. After reading a few postings in this forum, now it looks like this:
    -----------------------------------------
    <?php //accesscontrol.php
    session_start();
    include("common.php" );
    include("db.php" );
    $uid=$_SESSION['uid'];
    if($uid=="" ) {
    $uid=$_POST['uid'];
    }
    $openpwd=$_POST['pwd'];
    if($openpwd=="" ) {
    $openpwd=$_SESSION['pwd'];
    }
    //echo $uid;
    $salt=substr($openpwd, 0, 2);
    $cryptpwd=crypt($openpwd, $salt);
    $pwd=$openpwd;
    $thispage=$PHP_SELF;
    if($thispage=="" ) {
    $thispage=$_SERVER['PHP_SELF'];
    }
    if(!isset($uid)) {
    ?>
    <html>
    <head>
    <title> Please Log In for Access </title>
    <link rel="stylesheet" href="/local.css">
    <link rel="stylesheet" href="moviedb.css">
    </head>
    <body>
    <?php
    //echo "Supplied UID - $uid <br>\n";
    //echo "Supplied openpass - $openpwd <br>\n";
    //echo "Supplied cryptpass - $cryptpwd <br>\n";
    //echo "Supplied salt - $salt <br>\n";
    ?>
    <p> <font class=title><b>Login Required </b></font></p>
    <p>You must log in to access this area of the site. If you are
    not a registered user, <a href="useradd.php">click here</a>
    to sign up for instant access!</p>
    <p><form method="post" action="<?=$thispage?>">
    <table border=0>
    <tr>
    <td align=right>User ID/td><td><input type="text" name="uid" size="20"></td>
    </tr>
    <tr>
    <td align=right>Password/td><td><input type="password" name="pwd" SIZE="20"></td>
    </tr>
    <tr><td colspan=2 align=center><input type="submit" value="Log in"></td></tr>
    </table>
    </form></p>
    <?php
    //include "trailer.inc";
    ?>
    </body>
    </html>
    <?php
    exit;
    }
    $_SESSION['uid']=$uid;
    $_SESSION['pwd']=$pwd;
    //session_register("uid" );
    //session_register("pwd" );
    dbConnect("members");
    $sql = "SELECT * FROM user WHERE
    userid = '$uid' AND password = PASSWORD('$pwd')";
    $result = mysql_query($sql);
    if (!$result) {
    error("A database error occurred while checking your " . "login details.);
    }
    if (mysql_num_rows($result) == 0) {
    session_unregister("uid" );
    session_unregister("pwd" );
    ?>
    <html>
    <head>
    <title> Access Denied </title>
    <link rel="stylesheet" href="moviedb.css">
    <link rel="stylesheet" href="/local.css">
    </head>
    <body>
    <?php include "header.inc"; ?>
    <h1> Access Denied </h1>
    <?php
    echo "Supplied username - !" . $uid . "!<br>\n";
    echo "Supplied password - !" . $openpwd . "!<br>\n";
    echo "Supplied salt - !" . $salt . "!<br>\n";
    echo "Crypted password - !" . $cryptpwd . "!<br>\n";
    ?>
    <p>Your user ID or password is incorrect, or you are not a
    registered user on this site. To try logging in again, click
    <a href="<?=$thispage;?>">here</a>. To register for instant
    access, click <a href="useradd.php">here</a>.</p>
    <?php include "trailer.inc"; ?>
    </body>
    </html>
    <?php
    exit;
    }
    $username = mysql_result($result,0,"fullname");
    ?>
    -----------------------------------------
    It works fine, as long as I put
    <?php include("accesscontrol2.php"); ?>
    on the first line of every protected page, as intended.
    But now I've tried to build a protected page like this:

    -----------------------------------------
    <?php include("accesscontrol2.php"); ?>
    <?php include("header.php"); ?>
    -----------------------------------------
    When I try to link from the file 'header.php' to another protected page, it seems to loose the username and password (although I've put the
    -----------------------------------------
    <?php include("accesscontrol2.php"); ?>
    -----------------------------------------
    on the first line. It only works, when I put a normal HTML-page under that famous first line.
    Why doesn't the 'include'-method work?
    Or have I done something wrong????

    Ad

  22. #97
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    still no luck

    Ahhh thanks for the tips i tried but still no luck ,i keep get a blank page when i try to add even one field

  23. #98
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    this what i tried still no luck

    example code:

    $sql = "INSERT INTO profiles SET
    userid = '$newid',
    password = PASSWORD('$newpass'),
    fullname = '$newname',
    email = '$newemail',
    notes = '$newnotes'";
    Company_Name = '$Company_Name',
    City = '$City',
    Province = '$Province',
    Country = '$Country',
    Postal = '$Postal',
    Phone = '$Phone',
    Fax = '$Fax',


    and this what i'm using to do the fields:
    <form method=post action="<?=$PHP_SELF?>">
    <table width="522" height="426" border=5 cellpadding=0 cellspacing=5 bordercolor="#6633CC" background="http://copyexpress.ca/Images/background.JPG">
    <tr>
    <td align=right>
    <p><font color="#FF0000" face="Arial, Helvetica, sans-serif"><strong>U</strong></font>ser
    ID</p>
    </td>
    <td>
    <input name=newid type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr>
    <tr>
    <td align=right>
    <p><font color="#FF0000"><strong>F</strong></font>ull Name</p>
    </td>
    <td>
    <input name=newname type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr>
    <tr>
    <td align=right>
    <p><font color="#FF0000"><strong>E</strong></font>-Mail Address</p>
    </td>
    <td>
    <input name=newemail type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Company Name</font></strong></p>
    </td>
    <td>
    <input Company_Name=newCompany_Name type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">City</font></strong></p>
    </td>
    <td>
    <input City=newCity type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Province/State</font></strong></p>
    </td>
    <td>
    <input Province=newProvince type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Country</font></strong></p>
    </td>
    <td>
    <input Country=newCountry type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Postal</font></strong></p>
    </td>
    <td>
    <input Postal=newPostal type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Phone</font></strong></p>
    </td>
    <td>
    <input Phone=newPhone type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr><tr>
    <td align=right>
    <p><strong><font color="#FF0000">Fax</font></strong></p>
    </td>
    <td>
    <input Fax=newFax type=text maxlength=100 size=25>
    <font color=orangered size=+1><TT><B>*</B></TT></font>
    </td>
    </tr>
    <tr valign=top>
    <td align=right>
    <p><font color="#FF0000"><strong>O</strong></font>ther Notes<font color=orangered size=+1><TT><B>*</B></TT></font></p>
    <p><b><tt></tt></b></p>
    </td>
    <td>
    <font face="Arial, Helvetica, sans-serif">
    <textarea name="newnotes" cols="60" rows="8">Address:
    </font>
    </td>
    </tr>
    <tr>
    <td align=right colspan=2>
    <hr noshade color=black>
    <input type=reset value="Reset Form">
    <input type=submit name="submitok" value=" OK ">
    </td>
    </tr>
    </table>
    </form>


    Does anyone know why when i add the new felids why this won't work
    i got the feilds made already in mysql,but it's the php page that won't show up in the browser ,but display fine in dreamweaver preveiw ahhhh

  24. #99
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to start looking better at the code examples you're given.

    You need to get the grasp on the syntax. Look at the example I gave you. Examine: Where are the single quotes, double quotes and semicolon?
    You need to have the same syntax in your code.
    The order of the MySQL columns aren't important.

    Try
    Code:
    $sql = "INSERT INTO profiles 
               SET userid = '$newid',
                 password = PASSWORD('$newpass'),
                 fullname = '$newname',
                    email = '$newemail',
                    notes = '$newnotes',
             Company_Name = '$Company_Name',
                     City = '$City',
                 Province = '$Province',
                  Country = '$Country',
                   Postal = '$Postal',
                    Phone = '$Phone',
                      Fax = '$Fax'";
    HTH

    -Helge

  25. #100
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the new feilds show up blank in the table

    thanks I have tried that the form submits but still only collects the oringal feild my new feilds just show up blank in the data base ?
    yet it still registers the new user?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •