Jump to content

deecos

Members
  • Posts

    13
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Northern Utah

deecos's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Thanks Rob! I simply want you to know that your suggestion did not go unnoticed. I found what I needed at the site you suggested! Thanks again for the help, I owe ya!
  2. The countdown clock works great, but I am interested to know if there are other fonts available? I assume the "lcdb0" may be replaced with other values. Where can I find a list of valid values? Better yet, a list of values with sample display so I might know what I'm getting rather than trial and error. Thanks ahead of time for your attention to my inquiry!
  3. Thanks to all of you for supplying the hints and key information I needed to solve this problem. To begin with, I didn't understand which functions were PHP and which ones were MySQL, so I had to wade through the documentation to better understand it. My requirement was to accept user input from a form, then post the user input along with the current date (or system date) to the database. The following code , derived from the suggestions, hints, and a little research, acheives the desired result. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO SUBSCRIBER_T (FULL_NAME, EMAIL_ADDR, CREATE_DT) VALUES (%s, %s, CURRENT_DATE())", GetSQLValueString($_POST['FULL_NAME'], "text"), GetSQLValueString($_POST['EMAIL_ADDR'], "text")); Thanks again for everyone's help! Rock Sign
  4. I sense I am getting closer, but no cigar. The most recent suggestion GetSQLValueString($Get_current_date,"date")); produces the following error: Column 'CREATE_DT' cannot be null (the column is defined as NOT NULL) Although an earlier suggestion failed date('Y m d'), "date")); I modified it as follows date('Y-m-d'), "date"); resulting in no errors, but the value that posted in the database was 0000-00-00 Thanks for all your suggestions I'll keep working at it.
  5. Thanks for the help, but I was unable to get it to work. First I got some crazy error that I resolved by removing an extra parenthesis (See red parenthesis below) $insertSQL = sprintf("INSERT INTO SUBSCRIBER_T (FULL_NAME, EMAIL_ADDR, CREATE_DT) VALUES (%s, %s, %s)", GetSQLValueString($_POST['FULL_NAME'], "text"), GetSQLValueString($_POST['EMAIL_ADDR'], "text"), now(),"date")); After I eliminated that problem, I got the following error. Fatal error: Call to undefined function: now() in /home/sniborn/public_html/_db_insert_test1.php on line 37
  6. PHP wizards one an all, I need help with some PHP syntax (maybe a system memory variable too). I would like to know how to insert the current system date into a MySQL column. Below is some code generated from Dreamweaver that inserts a date provided via an input form. I would like to replace the form's input value and simply insert the date behind the scenes (no need to ask the user to supply today's date) I believe the date format MySQL expects is YYYY-MM-DD. Now that I think about it, it would be nice to know the same thing for a column defined as a timestamp as well. Thanks ahead of time for any time you can devote to my inquiry. ********************************************* ______________the infamous CODE_______________ ********************************************* <?php require_once('Connections/test.php'); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO SUBSCRIBER_T (FULL_NAME, EMAIL_ADDR, CREATE_DT) VALUES (%s, %s, %s)", GetSQLValueString($_POST['FULL_NAME'], "text"), GetSQLValueString($_POST['EMAIL_ADDR'], "text"), GetSQLValueString($_POST['CREATE_DT'], "date")); mysql_select_db($database_test, $test); $Result1 = mysql_query($insertSQL, $test) or die(mysql_error()); } ?>
  7. You know, it really helps to write down the problem because you re-visit the things that are required and double check them in a methodical manner. After re-visiting each step I claimed to have completed (in my prior posting), I discovered the access priveledges had not been set for the user. I was certain I had set them, but they were not established as I had thought. Thanks again for a great thread that helped me get connected!
  8. Okay you gurus I need help connecting from Dreamweaver MX 2004 to MySQL. After reading this thread for a couple days now I believe I have done all the pre-requisites of creating a database with a table, creating a user with all privileges (and a password) and my "Access Hosts" include both "localhost" and "%". MySQL Connection looks like: Connection Name: testing123 MySQL server...: www.snibor.net User name......: testuser Password.......: *********** Database.......: When I click the select ICON i get the following error: 1045 Access denied for user: 'testuser@server38.totalchoicehosting.com' (Using password:YES) In a previous posting (the 8th posting in this thread) rocket_rob had the same error. His problem was apparently solved by adding 69.50.193.12 to his "Access Hosts" via CPanel. I don't know what IP Address to add to my Access Hosts?? Interestingly, when I tried the following MySQL connection: Connection Name: testing123 MySQL server...: www.snibor.net User name......: sniborn_testuser (this is how the ID appears in CPanel) Password.......: *********** Database.......: I do not get an error, rather I am presented with a "select database" dialog box, but it is empty, no databases displayed to select. Regardless, I honestly thought I could figure this out from the wealth of information in this thread but it's just evading me. Thanks ahead of time for any help you can provide.
  9. Okay, so it's been a while since the previous posting, but I just wanted to say that I needed help with web forms, I found this thread and in less than 2 hours I was able to produce a funcitoning form on my web site. Incredible, considering I just learned how to spell PHP today. Kudos to Surefire, TCH Forum members, and TCH for making life a little easier.
  10. Thanks for the advice. A Help Desk ticket is what I'll do next.
  11. Domain has been up and running since January 25, 2004.
  12. All, I am having trouble receiving email at my domain hosted by Total Choice Hosting. My domain is snibor.net If I send emails from anyid@snibor.net to anyotherid@snibor.net the email works flawlessly. However, when I send an email to anyid@snibor.net from a different domain (e.g. hotmail, yahoo, etc) I receive the following error: Failed to deliver to 'anyid@snibor.net' SMTP module(domain snibor.net) reports: http: host name is unknown I could set up a help desk ticket, but I thought I would start here first. Any help or suggestions you can offer is appreciated. Thanks ahead of time for your attention to my inquiry. lost in email prison
×
×
  • Create New...