Jump to content

rscott7706

Members
  • Posts

    88
  • Joined

  • Last visited

Posts posted by rscott7706

  1. [!--quoteo(post=375499:date=May 20 2006, 07:19 AM:name=alpine)--][div class=\'quotetop\']QUOTE(alpine @ May 20 2006, 07:19 AM) [snapback]375499[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    just rename the form action to the same name as you choose on that file, example getpass.php - nothing is to be splitted up. Remember to correct the table and col names, + ofcourse you will need to include a connection to your mysql db.
    [/quote]


    Cool!! Thanks alpine!!
  2. [!--quoteo(post=375408:date=May 19 2006, 05:54 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 19 2006, 05:54 PM) [snapback]375408[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    umm, just look for virtually any login script and remove the register linkie?
    [/quote]

    I hear you, but I did not explain my main issue - the users of this site are at best computer illiterate.

    I would like a script that will "recover' the password, not send an new crytic looking one.
    All of the routines I seen so far only allow a "new" password to be sent, I need to recover the original.

    I know security is lower in this scenario, but not a hugh issue.


    Thanks alpine, I sure appreciate the help.

    I can't get to it this morning, but will start working on it later today.

    Please indulge me a little, I am still so new to this - and maybe a little dull in the cranium...

    It looks like you have the users form and the php action script together here. Maybe I am way off, but on the bottom I see the form actions as "this.php" - wouldn't that be the code above saved as a separate file?

    Or am I still not understanding all this? Gads - hate being a novice. I know just like everything else I will start picking this up, but PHP has been a slower curve for me.

  3. [!--quoteo(post=375408:date=May 19 2006, 05:54 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 19 2006, 05:54 PM) [snapback]375408[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    umm, just look for virtually any login script and remove the register linkie?
    [/quote]

    I hear you, but I did not explain my main issue - the users of this site are at best computer illiterate.

    I would like a script that will "recover' the password, not send an new crytic looking one.
    All of the routines I seen so far only allow a "new" password to be sent, I need to recover the original.

    I know security is lower in this scenario, but not a hugh issue.
  4. Hi all, I have a MYSQL database for a an organization, with Name, Company, logon name, password and email.

    The organization does not want new user validation, they will assign a logon name and password when someone joins.

    What we do need is a script that would allow them, armed with their Name, Company Name and email, to either change their password, or retrieve if forgotton.

    This is a little different then most scripts out there that have a whole user validation process up front.

    Does any one know of a free or low-cost routine out there?
  5. Have you ever had a coding job that worked the first time????
    <Don't answer - especially if it's "Yes">.

    I know it is probably a dumb little mistake -
    but I have looked at it so many times I am going cross-eyed.

    I am building a form that uploads records through PHP to MYSQL.
    I found the scripts here (very simple basic stuff):

    [a href=\"http://www.freewebmasterhelp.com/tutorials/phpmysql/4\" target=\"_blank\"]http://www.freewebmasterhelp.com/tutorials/phpmysql/4[/a]

    I think I coded my stuff the same as the examples, but it doesn't work. I get this error message:

    Parse error: parse error, unexpected '=' in /home/lakeside/public_html/php/insert.php on line 26
    (line 26 matches the php code below: $E-mail_Address=$_POST['E-mail_Address'];)

    Be aware I put some hard returns here so it doesn't mess you folks up viewing it on the forum. So
    if you want the original code without breaks, I can supply it.

    Thanks for any help in advance!!

    [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

    Here is the code (PHP/HTML first then HTML form):

    [!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]PHP / HTML[!--sizec--][/span][!--/sizec--]
    ==============================================================
    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Lakesie Chamber - Data Entry Form</title>
    </head>

    <body>
    <?
    $username="lakeside_rscott";
    $password="";
    $database="lakeside_chamber";

    $Company_Name=$_POST['Company_Name'];
    $Business_Category=$_POST['Business_Category'];
    $Directory_Catagory=$_POST['Directory_Catagory'];
    $Description_of_Business=$_POST['Description_of_Business'];
    $Address=$_POST['Address'];
    $City=$_POST['City'];
    $State=$_POST['State'];
    $Zip_Code=$_POST['Zip_Code'];
    $First_Name=$_POST['First_Name'];
    $Last_Name=$_POST['Last_Name'];
    $Phone_Number=$_POST['Phone_Number'];
    $Website_Site_Address=$_POST['Web_Site_Address'];
    $E-mail_Address=$_POST['E-mail_Address'];

    mysql_connect(localhost,$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");

    $query = "INSERT INTO members VALUES ('','$Company_Name','$Business_Category','$Directory_Category','$Description_of_Business',
    '$Address','$City','$State','$Zip_Code','$First_Name','$Last_Name','$Phone_Number',
    '$Web_Site_Address','$E-mail_Address')";
    mysql_query($query);

    mysql_close();
    ?>

    </body>

    </html>

    =====================================================

    [!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]HTML / Form[!--sizec--][/span][!--/sizec--]

    =====================================================

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Data Entry Form</title>

    <style type="text/css">
    <!--
    BODY { font-family: arial, verdana, helvetica, sans-serif; font-size: small; color:
    Maroon; }
    P { font-family: arial, verdana, helvetica, sans-serif; font-size: small;
    color: Maroon; }
    TD { font-family: arial, verdana, helvetica, sans-serif; font-size: small;
    color:
    Navy; }
    TD.N { font-family: arial, verdana, helvetica, sans-serif; font-size: small; color:
    Maroon; }
    TD.G { font-family: arial, verdana, helvetica, sans-serif; font-size: small; color:
    Gray; }
    TD.S { font-family: arial, verdana, helvetica, sans-serif; font-size: small; color:
    Silver; }
    H1 { font-family: arial, verdana, helvetica, sans-serif; font-size: medium;
    color: Navy; font-weight : bold; margin-top : 0; margin-bottom : 0; margin : 0px 0px 0px 0px; }
    H2 { font-family: arial, verdana, helvetica, sans-serif; font-size: x-small;
    color: Maroon; font-weight : bold; margin-top : 0; margin-bottom : 0; margin : 0px 0px 0px 0px; }
    A { color: #0000FF; text-decoration: none; }
    A:visited { color: #3344FF; text-decoration: none; }
    A:hover { color: #CC0033; text-decoration : underline;
    background-color:#E6E9FE; }
    SMALL.x { font-size : small; }
    SMALL.xg { font-size : small; color: gray; }
    STRONG { font-size : small; color: Navy; }
    //-->
    </style>
    </head>
    <body>
    <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="650" id="table2">
    <tr>
    <td valign="top"><form action="insert.php" method="post">
    <table border="0" cellpadding="0" cellspacing="0" width="650" id="table3">
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Company Name:
    </font> </td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Company_Name" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Business Category:
    </font> </td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Business_Category" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Directory_Category:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Directory_Catagory" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Description of_Business:
    </font> </td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Description_of_Business" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Address:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Address" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">City, State, Zip:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="City" size="14">
    <input type="text" name="State" size="4">
    , <input type="text" name="Zip_Code" size="10"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">First Name:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="First_Name" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Last Name:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Last_Name" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Phone:</font></td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Phone_Number" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">Website:
    </font> </td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="Web_Site_Address" size="33"></td>
    </tr>
    <tr>
    <td valign="top" width="241" align="right">
    <p style="margin-top: 0; margin-bottom: 3px"><font size="2">E-mail:
    </font> </td>
    <td valign="top">
    <p style="margin-top: 0; margin-bottom: 3px">
    <input type="text" name="E-mail_Address" size="33"></td>
    </tr>
    </table>
    <p>
    <input type="Submit">
    </p>
    </form>
    <p style="margin-top: 0; margin-bottom: 3px"> </td>
    </tr>
    </table>
    <p> </div>

    </body>
    </html>
    ==============================================================

  6. OK, I am fairly new to PHP, so may make an error here. But, if you follow these instructions, it should work.

    I will assume that your form will be named form.php (or something like that - at least with a php extension).

    In that file (your form file), near the top, place the following code:

    # connect to database
    include("log.php");

    1. The "# connect to database" is just a comment to indicate what the code is for.

    2. You can use any name for the file as long as the extension is .php (db.php, connect.php, etc).

    3. Create a file called log.php and put the following code in it:

    <?php
    $db = mysql_connect("localhost", "user_name", "password");
    mysql_select_db("db_name");
    ?>

    Where "localhost" is the required server name (normally localhost - may not be in your case)

    user_name is your server user user name (usually supplied by the server host)

    password - same as above

    db_name is the name of your database (not the table - that will be named in your file where you indicate sotrage address).

    Hope this helps...

    If any of you journeymen see problems here please correct me!!




  7. Hey all. I am creating a query table that will sample my MYSQL database with various fields.

    I found this code, and it works great except I need to assign hyperlinks to fields ($row) 12 and 13.

    I know it is a simple thing (I think), just adding the opening <A HREF and closing <a> to the code lines of 12 and 13, but I am at a loss as the the right syntax. Can you help?

    echo "<table cellpadding=10 border=0>";
    while($row = mysql_fetch_row($result)) {
    echo "<tr>";
    echo "<td>".$row[1]."</td>";
    echo "<tr>";
    echo "<td>" . $row[12]."</td>";
    echo "<tr>";
    echo "<td>".$row[13]."</td>";
    echo "</tr>";
    }
    echo "</table>";

    Thanks in advance!!
  8. This is a conglomeration of two separate things that should not be together.

    You have a php file that should stay separate from the html file.

    The html file is an html page with a form for submitting info to an email name in the php file.

    The html file should reference a "get" to the php file. And the reference to the php file is in the wrong place.

    Do these things and it will work.

    1. Cut the whole section of php (start at <?php and go to ?>) and save it as "emailform.php".

    2. In the php file check the email name - is that the right one for who you want to get the results of the form submittal if not, change if so leave alone.

    3. In the php text find this section:

    <body onLoad="MM_preloadImages('images/nav/home_on.gif','images/nav/aboutus_on.gif','images/nav/ourprod_on.gif','images/nav/bell_on.gif','images/nav/eurocopter_on.gif','images/nav/md_helicopters_on.gif','images/nav/robinson_on.gif','images/nav/schweizer_on.gif','images/nav/sikorsky_on.gif','images/nav/downloads_on.gif','images/nav/submit_profile_on.gif','images/nav/contact_on.gif')">
    <form name="emailform.php" method="post" action="">

    The mistake is that the form is named "emailform.php" but the action should be "emailform.php"

    Change it to this:

    <body onLoad="MM_preloadImages('images/nav/home_on.gif','images/nav/aboutus_on.gif','images/nav/ourprod_on.gif','images/nav/bell_on.gif','images/nav/eurocopter_on.gif','images/nav/md_helicopters_on.gif','images/nav/robinson_on.gif','images/nav/schweizer_on.gif','images/nav/sikorsky_on.gif','images/nav/downloads_on.gif','images/nav/submit_profile_on.gif','images/nav/contact_on.gif')">
    <form name="[!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--]Parts_Inv[!--colorc--][/span][!--/colorc--]" method="post" action="[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]emailform.php[!--colorc--][/span][!--/colorc--]">

    (The Parts_Inv is just a suggestion - you should be able to use anything here.

    4. Cut the whole html section out and save it as an html file (*.html) with whatever file name you feel is right (Part_Inv.html).

    5. Load both to your server and it should work.

    What it does it takes the users input and dends it through the php script to the email name.

    It is a little clunky and I don't even think the php is needed since it just goes straight to an email name.

    Hope this helps.
  9. 1. Is you logon ifo correct? In other words, is "root" really your user name? Seems a little out of place, but not inconceivable. Anyway, check that the three components are right.

    2. Is your script on the website (or server) when you try to execute the script? It has to reside there, not your local computer.

    3. I am new to PHP, but I am not sure if the PHP statement:

    if($db)
    echo "conn successful";
    else
    echo "conn not successful";
    ?>

    will work without identifying you database.


    Here is a statement that will connect you if you have a database (given you know the database name and replace "your_database_name" with the correct name.

    <?php
    $db = mysql_connect("localhost", "root", "ramki");
    mysql_select_db("your_database_name");
    ?>
  10. Hello, as in many cases, brand new to MYSQL and PHP.

    I have a 119 record MYSQL that I am querying through PHP. I would like to display as three columns.

    Here is some of the code, is there a way to use this code then disply as three equal columns?

    <?php
    $db = mysql_connect("localhost", " ", " ");
    mysql_select_db(" ");
    $query = "SELECT * FROM members";

    $result = mysql_query($query) or die(mysql_error());

    while($row = mysql_fetch_array($result)){
    echo $row['Company_Name'];
    echo "<br />";
    echo "Contact: ";
    echo $row['First_Name'] . " ". $row['Last_Name'];
    echo "<br />";
    echo $row['Mailing_Address'];
    echo "<br />";
    echo $row['Mailing_City']. ", ". $row['Mailing_State']. " ". $row['Mailing_Zip_Code'];
    echo "<br />";
    echo "Phone: ";
    echo $row['Phone_Number'];
    echo "<br />";
    echo "Fax: ";
    echo $row['Fax_Number'];
    echo "<br />";
    echo "<br />";
    }
    ?>

    Thanks in advance!

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