Jump to content

cearlp

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by cearlp

  1. My BAD! The code is mysqli_error() not mysql_errno(). BUT, adding the $conn to the mysqli_error($conn) produces a valid and informative error message. Many thanks for the help.
  2. Two identical php programs doing a mysqli_query, but on different databases. One succeeds and the other fails. The one that fails returns no errno. Could the cause be the databases? If so, what could be the problem? They are real similar in construction, one has more fields than the other, but almost the same data in both. $conn = use, passwd, database $sql = insert into members (name,addr,city,state) values('Joe','123 St','Somecity','CA') $result = mysqli_query($conn, $sql) or die (Can't run query because " . mysql_errno());
  3. Thanks, I will post to the javascript forum.
  4. I wasn't looking at it that way. My flow is like this: As stated, the function is in the <head> section of the file. A form is displayed and if the submit button is selected the page reloads itself. If isset($_POST['submit'] is true certain fields are checked for being blank. If they are, an alert box is displayed and the form is re-displayed with the data that has already been filled in. If the fields are not blank processing continues and later in the process flow a database is going to be updated. At this point I want to call a confirm function to display a confirm box and need the response of either OK or Cancel to either continue the update or re-display the form. Does this make sense?
  5. I define a Javascript in the <head> section of a .php file and call it from the <body> section with the following: echo "<script language='javascript'>function();</script>". The function displays a confirm box with the normal Cancel and OK buttons just fine, but I want to capture the function return of true or false for which button was selected. So far I haven't found a way to get return a value from the function. Any ideas???
  6. Thanks for the help Crayon Violent. I can get by be calling the script with onsubmit but can a javascript be called from anywhere in a php script?
  7. I have a php script that creates an HTML form and then gets input from the submission of that form. Is it possible for the php script to display some sort of confirmation request and then receive input from the keyboard in response to the request before processing the data that was input via the form? I hope this question make sense? Thanks in advance.
  8. Responding to the two previous replies --- A port checker shows on;y port 80 as being active (naturally since I am using http to run the port checker ) and I know sendmail.dll is not a mailserver but I thought since I only have Outlook Express as a mail program (it's never used though it is installed) it might be using sendmail.dll and tying up port 25.
  9. I am running XP so I have a sendmail.dll but I don't know if anything else is using port 25. Is there a way to out?
  10. In my php.ini fille I have SMTP = localhost, smtp_port = 25 and sendmail_from = me@localhost Running my php script gives me the following error: Warning: mail() [function.mail] Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Program Files\Apache2.2\htdocs\mail-comments.php on line 29. I have tried several different ini_set("sendmail_from", "xxx@yyy.com") lines in the php script but always get the same error. Is there something specific about the sendmail_from variable that I am overlooking?
  11. Hello, Don't know if this is the correct forum for my question but here goes... I use PHP within an html file to generate table data. The table data are links and by default they are underlined. I want to eliminate the underlining and have tried to do this using CSS and a rule for anchors. Ex: a {text-decoration: none;} This does not work and I can only think that it is because the <td>.....</td> is generated with an echo statement in PHP. Here is the code: echo "<tr style='background color:$bgcolor;'><td><a href='".$_SERVER['PHP_SELF']."?memberid=$id'>$name</a></td></tr>"; The html page is rendered correctly and the links work as planned. I just want to get rid of the underlines under the name. Any thoughts?
×
×
  • 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.