Jump to content

joshuaceo

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joshuaceo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This website does it. would anyone know how to show the encrypted password? http://www.md5encrypter.com/
  2. I am trying to edit a shopping cart and I want to be able and view and edit user accounts in the admin area. Right now I managed to show the password with this code: <div class="listItemText" style="width:150px;"><?=htmlspecialchars($db->col["password"])?></div> So what code would I need to put so that it would show the password and not the md5 encrypted password? This is what currently shows: fe01ce2a7fbac8fafaed7c982a04e229 the password should be: demo I hope someone can help =)
  3. Is it possible to show todays date but 29 days after: How would I do this on this code below: $expdate = gmdate("Y-m-d"); Also just incase it is not possible. Is there a way to show todays date in exactly this format: 2009-01-02
  4. Thanks for all of the replys. So i would put everything together like this? <?php $con = mysql_connect("localhost","crown_brownu","asdfasdf"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("crown_brownies", $con); $password=md5($_POST[password]); $sql="INSERT INTO users (newsletters, updates, fname, lname, login, password, company, address1, address2, city, state, province, zip, country, email, email_mode, level, phone) VALUES ('$_POST[newsletters]','$_POST[updates]','$_POST[fname]','$_POST[lname]','$_POST[login]','$password','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]','$_POST[email]','$_POST[email_mode]','$_POST[level]','$_POST[phone]')"; $res1 = mysql_query($sql); if (!mysql_error()) { $sql="INSERT INTO users_shipping (is_primary, name, company, address1, address2, city, state, province, zip, country) VALUES ('$_POST[is_primary]','{$_POST[fname]} {$_POST[lname]}','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]')"; $res2 = mysql_query($sql); } if (!mysql_error()) if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 user added"; mysql_close($con) ?>
  5. I changed this line: if (!mysql_query($sql,$sql2,$con)) { die('Error: ' . mysql_error()); } echo "1 user added"; mysql_close($con) ?> would that work? if not can you let me know what i should change. I really don't know much about php =(
  6. It worked =D but now the information in table users didn't get submitted. Can you let me know what I am doing wrong? <?php $con = mysql_connect("localhost","crown_brownu","asdfasdf"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("crown_brownies", $con); $password=md5($_POST[password]); $sql="INSERT INTO users (newsletters, updates, fname, lname, login, password, company, address1, address2, city, state, province, zip, country, email, email_mode, level, phone) VALUES ('$_POST[newsletters]','$_POST[updates]','$_POST[fname]','$_POST[lname]','$_POST[login]','$password','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]','$_POST[email]','$_POST[email_mode]','$_POST[level]','$_POST[phone]')"; $sql="INSERT INTO users_shipping (is_primary, name, company, address1, address2, city, state, province, zip, country) VALUES ('$_POST[is_primary]','{$_POST[fname]} {$_POST[lname]}','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 user added"; mysql_close($con) ?>
  7. will it insert fname and lname in the the users_shipping table under name? basically i am trying to make fname and lname (example: John Smith). and turning those 2 values into name which would be the full name John Smith.
  8. Here is insertnames.php <html> <body> <form action="insert.php" method="post"> First Name: <input type="text" name="fname" /><br><br> Last Name: <input type="text" name="lname" /><br><br> <input type="submit" /> </form> </body> </html> Here is insert.php <?php $con = mysql_connect("localhost","crown_brownu","asdfasdf"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("crown_brownies", $con); $sql="INSERT INTO users (fname, lname) VALUES ('$_POST[fname]','$_POST[lname]')"; $sql="INSERT INTO users_shiping (name) VALUES ('$_POST[name]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 user added"; mysql_close($con) ?> My question is how do I join fname and lname to become one name so that I can import this into users_shipping under name?
  9. i have phpmyadmin. where can i find this import feature?
  10. How can I import a .csv file to a mysql database? Or at least a long list. For example i would like to import this list into a mysql database: assets/images/economyhalt12401_thumbnail.jpg assets/images/economyhalt12401_thumbnail.jpg assets/images/165310-bag-in-a-bag_thumbnail.jpg assets/images/123810_thumbnail.jpg assets/images/polos1_thumbnail.gif assets/images/stlourdnsheepboots_thumbnail.jpg assets/images/double-safety.05_thumbnail.jpg assets/images/148684_thumbnail.gif assets/images/203111_thumbnail.gif assets/images/106242_thumbnail.gif assets/images/203110_thumbnail.gif assets/images/203109_thumbnail.gif assets/images/stud-plugs_thumbnail.gif assets/images/stud-plugs(1)_thumbnail.gif assets/images/ez-mount-western_thumbnail.gif assets/images/239407_thumbnail.jpg assets/images/239411_thumbnail.jpg assets/images/239415-braided-visalia_thumbnail.gif assets/images/239419d-dark-stained_thumbnail.gif assets/images/246033l-stirrup_thumbnail.jpg assets/images/239408_thumbnail.jpg assets/images/239412_thumbnail.jpg assets/images/shenshowreins_thumbnail.jpg assets/images/159012(1)_thumbnail.gif assets/images/shendouble-stitchreins(1)_thumbnail.jpg assets/images/159013_thumbnail.gif assets/images/159010_thumbnail.gif assets/images/nw50_thumbnail.gif assets/images/159014_thumbnail.gif assets/images/beta-combo-bridle_thumbnail.jpg assets/images/159016beta-rein_thumbnail.jpg assets/images/race-bridle_thumbnail.gif *it would be much longer, this is just a sample
  11. Can you show me the code to do it the way you mentioned? I really don't know much about php. I hope you can help and thanks so much!
  12. The reason is I really don't know anything about php and wanted to know if it would work like I have it above. So this should work without any problems? or is there a better way to have the insert.php file?
  13. This is the form: <html> <body> <form action="insert.php" method="post"> Newsletters: <input type="text" name="newsletters" /><br><br> Updates: <input type="text" name="updates" /><br><br> First Name: <input type="text" name="fname" /><br><br> Last Name: <input type="text" name="lname" /><br><br> Login: <input type="text" name="login" /><br><br> Password: <input type="text" name="password" /><br><br> Company: <input type="text" name="company" /><br><br> Address: <input type="text" name="address1" /><br><br> Address2: <input type="text" name="address2" /><br><br> City: <input type="text" name="city" /><br><br> State: <input type="text" name="state" /><br><br> Province: <input type="text" name="province" /><br><br> Zip: <input type="text" name="zip" /><br><br> Country: <input type="text" name="country" /><br><br> Email: <input type="text" name="email" /><br><br> Email Mode: <input type="text" name="email_mode" /><br><br> Phone: <input type="text" name="phone" /><br><br> <input type="submit" /> </form> </body> </html> This is insert.php <?php $con = mysql_connect("localhost","crown_brownu","asdfasdf"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("crown_brownies", $con); $password=md5($_POST[password]); $sql="INSERT INTO users (newsletters, updates, fname, lname, login, password, company, address1, address2, city, state, province, zip, country, email, email_mode, phone) VALUES ('$_POST[newsletters]','$_POST[updates]','$_POST[fname]','$_POST[lname]','$_POST[login]','$password','$_POST[company]','$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]','$_POST[email]','$_POST[email_mode]','$_POST[phone]')"; $sql="INSERT INTO users_shipping (address1, address2, city, state, province, zip, country) VALUES ('$_POST[address1]','$_POST[address2]','$_POST[city]','$_POST[state]','$_POST[province]','$_POST[zip]','$_POST[country]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 user added"; mysql_close($con) ?> Will this work correctly by sending the same information to 2 different tables? I hope someone can help
  14. Thanks so much. Now adding to my first message. Is there a way to make the information go to 2 separate tables (user_shipping and users)? But in the second table only (address1, address2, city, state, zipcode, country) get submitted. Is this possible and how can i do this? Also would I need to make 2 insert.php files? I hope you can help with this last question. Thanks soo much!
  15. Thanks soooo much zenag. This really helped me. by the way do u know how to make a html selection form do the following: i choose usa in selection dropdown...and after this the state field appears below with usa states. I choose canada and a canada states selection dropdown box shows etc..? hope u can help
×
×
  • 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.