Jump to content

lugos

Members
  • Posts

    61
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    United States

lugos's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. lugos

    locale

    Hello,Is it possible to set the locale for the Javascript Date utility? We have offices in the far east, but we need to make sure that the date that is sent to our servers, which reside on the east coast of the U.S., is the date here in the U.S., not the date over there.Thanks in advance for the assistance.
  2. lugos

    Survey app

    Hello,I would like to create a very small and simple PHP app to conduct an anonymous survey. The survey would be about 10 questions max, and there would be 4 or 5 possible answers for each. I would also like to store the results in a table. What would be the best way to set up the table? Should I have a row for each question and then 4 or 5 integer columns that are only updated if the user has selected that specific answer to that question? For instance if the user answers option 2 for question number one, then I would update row one, option_2_column_name. Any thoughts/ideas?Thanks in advance.lugos
  3. lugos

    Sending e-mails

    I'm trying to run it locally using Apache on Win XP . Is there anything I have to do to the php.ini file? Do I have to set the SMTP server? I also read somewhere that PHP does not support SMTP authentication. Is that correct?Also, I am hosting my site using a Linux web server that I set up myself. The distribution of Linux is Ubuntu. It fails to send messages on the web server also.Thanks.
  4. lugos

    Sending e-mails

    Hello,I am fairly new to PHP development and I'm trying to send e-mails using the following code:<?php$to = "myemailaddress@myisp.com";$subject = $_POST['subject'];$body = $_POST['message'];$headers = "From: " . $_POST['emailAddress'] ."\n";if (mail($to,$subject,$body,$headers)) { echo("<p>Message sent</p>");} else { echo("<p>Failed to send message</p>");}?>For some reason it does not work. I keep getting the failure message. I have verified that all of the values are being passed.Any help would be greatly appreciated.Thanks in advance.
  5. lugos

    Floating div

    Simple enough. How easily I forget; I haven't been doing much HTML development lately and put my own website on hold during the school semester. I actually tried going to your website first and saw that it was under construction. I look forward to seeing it once it's done.Thanks for the help.
  6. lugos

    Floating div

    Hello,Here is the code I am having trouble with:<table><tr id="fundingAmount"> <td style="padding-bottom: 0; width: 150px;"><strong>Amount:</strong><div style="float: right; font-size: 12px; margin: 0; display: inline;">$</div></td> <td style="padding-bottom: 0; width: 150px;"><input type="text" name="amount" maxlength="20" /></td></tr></table>I want the $ sign to be on the right side of the first column, on the same line. However, the code above puts it to the right and on the next line. I hope that's not confusing. If you copy and paste it, you'll see what I mean. I've tried a few things but nothing seems to work.Any help would be greatly appreciated.Thanks,lugos
  7. Hello,I'm relatively new to SQL and databases in general. I am not too familar with the terminology. I want to do a personal website where I can post messages and allow people to respond (similar to a blog). For the database structure/design, I was thinking of having one table for my original message, and in that table including an INT column that the database automatically increments every time a new row is created (it will be a unique field). The number generated by the database will then be used as a key/identifier in another table that contains the responses. That key/identifier will be used to link the responses to my original message. I hope that makes sense.So basically my question is if this sounds like it can work? Also, feedback and/or suggestions will be greatly appreciated. If there is a better way I would gladly consider it.Thanks,lugos
  8. lugos

    SQL or PHP?

    Hello,I am going through the book Dreamweaver 8 with ASP, ColdFusion, and PHP Training from the Source, which by the way I think is an excellent book for beginners who want to learn dynamic web development using Dreamweaver. The book includes a tutorial which is almost like a case study, where each chapter builds upon the previous chapters. So I'm stuck at a point in the book where a certain SQL statement is producing an error. However, I'm not sure if it's the SQL code, the PHP code, or possibly even Dreamweaver that's causing the error. So, if it is not a problem, I will post this question in the SQL forum also.Here is the SQL code: SELECT * FROM tbl_tours INNER JOIN tbl_countryON tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName Now, the book says that the following SQL code is the same as the above: SELECT * FROM tbl_tours, tbl_countryWHERE tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName But neither of them work. The PHP code is as follows: <?php require_once('Connections/conn_newland.php'); ?><?phpmysql_select_db($database_conn_newland, $conn_newland);$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON tbl_country.countryID=tbl_tours.country ORDER BY tbl_country.countryName";$rs_tourDetail = mysql_query($query_rs_tourDetail, $conn_newland) or die(mysql_error());$row_rs_tourDetail = mysql_fetch_assoc($rs_tourDetail);$totalRows_rs_tourDetail = mysql_num_rows($rs_tourDetail);?> This PHP code is generated by Dreamweaver. I am very new to the PHP programming language.Any help would be greatly appreciated.Thanks,lugos
  9. lugos

    SQL or PHP?

    Hello,I am going through the book Dreamweaver 8 with ASP, ColdFusion, and PHP Training from the Source, which by the way I think is an excellent book for beginners who want to learn dynamic web development using Dreamweaver. The book includes a tutorial which is almost like a case study, where each chapter builds upon the previous chapters. So I'm stuck at a point in the book where a certain SQL statement is producing an error. However, I'm not sure if it's the SQL code, the PHP code, or possibly even Dreamweaver that's causing the error. So, if it is not a problem, I will post this question in the PHP forum also.Here is the SQL code: SELECT * FROM tbl_tours INNER JOIN tbl_countryON tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName Now, the book says that the following SQL code is the same as the above: SELECT * FROM tbl_tours, tbl_countryWHERE tbl_country.countryID=tbl_tours.countryORDER BY tbl_country.countryName But neither of them work. The PHP code is as follows: <?php require_once('Connections/conn_newland.php'); ?><?phpmysql_select_db($database_conn_newland, $conn_newland);$query_rs_tourDetail = "SELECT * FROM tbl_tours INNER JOIN tbl_country ON tbl_country.countryID=tbl_tours.country ORDER BY tbl_country.countryName";$rs_tourDetail = mysql_query($query_rs_tourDetail, $conn_newland) or die(mysql_error());$row_rs_tourDetail = mysql_fetch_assoc($rs_tourDetail);$totalRows_rs_tourDetail = mysql_num_rows($rs_tourDetail);?> This PHP code is generated by Dreamweaver. I am very new to the PHP programming language.Any help would be greatly appreciated.Thanks,lugos
  10. lugos

    form, question

    yeah, it works but it's not the best solution. using that opens the user's default e-mail application (e.g. microsoft outlook). it's better to use a script that mails the comment to your e-mail address. for instance, you can write code in comment.php to receive the comment and then e-mail it to you.
  11. <?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">ul{float:left;width:100%;padding:0;margin:0;list-style-type:none;}a{float:left;width:6em;text-decoration:none;color:white;background-color:purple;padding:0 0 0 .6em;border-right:1px solid white;}a:hover {background-color:#ff3300}li {display:list-item;margin-bottom: 2px;}</style></head><body><ul><li><a href="#">Link one</a></li><li><a href="#">Link two</a></li><li><a href="#">Link three</a></li><li><a href="#">Link four</a></li></ul><p>In the example above, we let the ul element and the a element float to the left.The li elements will be displayed as inline elements (no line break before or after the element). This forces the list to be on one line.The ul element has a width of 100% and each hyperlink in the list has a width of 6em (6 times the size of the current font).We add some colors and borders to make it more fancy.</p></body></html> This was taken directly from the w3schools.com site with minor alterations. I changed it from a horizontal menu to a vertical. Click here for the original code.
  12. lugos

    JAVA

    Oh ok. Try this link: http://ww2.cs.fsu.edu/~steele/XHTML/appletObject.html
  13. lugos

    JAVA

    Do you mean JavaScript, or Java as in Sun's Java programming language? If you are referring to the latter, you will need to make sure that your web hosting company (or your own server) supports Java Server Pages (JSPs). Then you rename your pages to be of type jsp (ie index.jsp). Then you enclose your Java code in <% %> tags.lugos
  14. lugos

    <DIV>

    Here is aspnetguy's code slightly modified to get the left, center, and right divs that you are looking for. You can change the width, add background color, add padding, add margins, etc. in the styles. If you're not too sure how to do it, the tutorials at w3schools.com are good for learning (google is also an excellent resource). Also, play around with margins and padding to get the look you desire.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Your Title Here</title><style type="text/css">#wrapper{width: 780px;margin: auto; /*centers site...remove if you do not want it centered*/}.paneLeft{width: 140px;float: left;}.paneCenter{width: 500px;float: left;}.paneRight{width: 140px;float: left;}.clearer{clear: left; /*needed for FireFox so both columns will stay in the wrapper*/}</style></head><body><div id="wrapper"><div class="paneLeft">...place menu here...</div><div class="paneCenter">...place content here...</div><div class="paneRight">...place pictures here...</div><br class="clearer"/></div></body></html> aspnetguy has got mad skillz! That layout code is simple yet bangin!lugos
  15. lugos

    scrollbar

    The reason why you're meta tag generated an error is because you are using DOCTYPE HTML 4.01 Transitional. You probably want to be using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> instead.
×
×
  • Create New...