Jump to content

Hybride

Members
  • Posts

    286
  • Joined

  • Last visited

Everything posted by Hybride

  1. .content_box { margin-top: 21px; width: 519px; background-color: #f1f1f1; overflow: auto; } - your overflow:auto is the culprit. Remove it to get rid of the scroll bars. Here are your other options when it comes to overflow:
  2. You have to escape your apostrophe in $test. $text = "They\'re here."; or mod how you put the $text in the query: mysql_query("UPDATE Table SET Field='" . $text . "'");
  3. Not sure what you're talking about, am on FF (3.0 specifically, and I checked 3 other browsers), and it's all fine. Btw, instead of hard coding all of those divs, since they are all the same width/heights, you could just create a style, like: #divbox{width:400px;height:20px} <div id="divbox"><input>...</div>
  4. To make anything side-by-side in a table, use <td> without closing </tr>. This one is side-by-side: echo "<a STYLE='text-decoration:none' href='/b2.php?index={$row['T_index']}'></td><td><img src='{$row['T_Case']}' width='60' height='80' border = '0'></td>"; echo "<td><font size = '2'>{$row['T_Title']}</font></a></td></tr>"; And from your example with the title underneath: echo "<a STYLE='text-decoration:none' href='/b2.php?index={$row['T_index']}'></td><td><img src='{$row['T_Case']}' width='60' height='80' border = '0'></td></tr>"; echo "<tr><td><font size = '2'>{$row['T_Title']}</font></a></td></tr>";
  5. Remove the quotes from your $postcommentq for the rows, not the values ('from' -> from). And when you're doing SQL statements, you should put a mysql_error() at the end of your query so you can tell what the error is exactly.
  6. Every bit helps, and you guys have given me great tips. I really appreciate it! (though I was expecting more of a harsher response. XD)
  7. Hey everyone, up for grilling is my portfolio: Anekyu. It's a design/code/writing (artistic?) portfolio, but I have this really aggravating amateur touch to it that I can't figure out what - my guess it's the softness of the graphics. (It's that last step before you get the "eureka!" moment to go to professionalism). I would really like it if you guys absolutely tear it apart and let me know what you think.
  8. Would adding a "season" and "inTeam" (name of team/quit?) to the data table help? "Season" would reference to the season you are looking up, and "inTeam" would reference to whether or not they are in the team (team name or no, if not in team anymore.) Sorry, somewhat confusing what you're asking for, but I hope that helps.
  9. It would be great to know what the issue actually is. What happens when multiple songs are selected? Looking at your second code page, my guess is that you're going to need a loop to loop through all the selected songs, since all it looks like is that it's taking just the first song.
  10. Ok, I got flustered with this code and decided to redo it a bit to see how it worked. It had to do with your Query/radio buttons, so I fixed that and cleaned it up a little. Here's what I got: <form method="POST" action="housekeeping_mailer.php"> <input name="Name" type="text" id="Name" size="20"\><br /><br /> <b>Email Address:</b><br /> <input name="Email" type="text" id="Email" size="20"\> <p> <b>Mobile Number:</b><br /> <input name="Mobile" type="text" id="Mobile" size="20"\> <p> <b>Dealer(FCS) Code:</b><br /> <input name="FCS" type="text" id="FCS" size="20"\> <p> <b>Vehicle Registration:</b><br /> <input name="Reg" type="text" id="Reg" size="20"\> <p> <input type="radio" name="query" value="Logistics"\> <b>Logistics Query </b></p> <input type="radio" name="query" value="HPI"\> <b>HPI Query </b></p> <p> <input type="radio" name="query" value="V5"\> <b>V5 Query </b></p> <p align="left"> <textarea name="Textarea" cols="50" rows="5" >Type your query here...</textarea> <br /><br /><input type="submit" value="Submit" name="submit"><input type="hidden" value="submit" name="submitted"></form> <? $group = $_POST['query']; $name = $_POST["Name"]; $email = $_POST["Email"]; $mobile = $_POST["Mobile"]; $fcs = $_POST["FCS"]; $reg = $_POST["Reg"]; $subject = $_POST["Query"]; $Logistics = $_POST["Logistics"]; //logistics $HPI = $_POST["HPI"]; //hpi $V5 = $_POST["V5"]; //v5 $message = $_POST["Textarea"]; if(isset($_POST['submit'])) { $subject = "Housekeeping - $subject Query"; $emailgroup = $_POST["Query"]; $emailmessage = "Contacts Name: $name\nEmail Address: $email\nQuery Type: $subject\nQuery is: $message"; $email1 = "[email protected]"; $email2 = "[email protected]"; $email3 = "[email protected]"; switch($group) { case "Logistics": $messagesent = mail($email1, $subject, $emailmessage,"From: $email\r\n" . "Reply-To:$email"); include "./querysent.shtml"; break; case "HPI": $messagesent = mail($email2, $subject, $emailmessage,"From: $email\r\n" . "Reply-To: $email"); include "./querysent.shtml"; break; case "V5": $messagesent = mail($email3, $subject, $emailmessage,"From: $email\r\n" . "Reply-To: $email"); include "./querysent.shtml"; break; default: include "./queryfailed.shtml"; break; } } ?>
  11. You could do something like: <div id="checkcontainer"> <div id="checks">checkboxes</div> <div id="text">check text</div> </div> Align the check boxes to the left, the text to the right, etc.
  12. Would be great to see what your code is, but if this is for a form or something non-layout, why not just use a table? And there are ways to use the two together, but it's a bit ugly (ie: using !important)
  13. Since you have padding, I think you can get away with creating a white border, something like border-right:1px solid #fff If not, you'll probably have to put another box in the middle (<div class="box1"><div id="separator"></div><div class="box2>...") and make that into a white background. That's the first thought that came to mind. Sorry if it's a bit complicated!
  14. Case statements work easier for multiple if/else statements. You can try something like this: switch($field_dayofweek) { case "sunday": // save to parent node with sunday break; case "monday": // save to parent node with monday break; case "tuesday": // save to parent node with tuesday break; ... default: // whatever you want default statement to be break; }
  15. Not sure about the rest, but off the bat, you're missing a end parenthesis all the way at the bottom of the code. else include "./queryfailed.shtml"; }
  16. Have you tried using preg_match? PHP's page on preg_match.
  17. Why would you have a list of customers? You could modify the admin login code they have on the tutorial to use for the customers instead. It checks against their information in the tbl_user, and once their credentials are validated, shows the client's shopping page.
  18. As Ken2k7 mentioned, a database is the best way to go. It's not too difficult to learn, and it will help you a lot later with the updates you want to do. Avoiding it will most likely hinder your process later on.
  19. Everything you would ever want to know about HTML5.
  20. The shorthand version is background: url(center.bmp) repeat-y; where "repeat-y" repeats the image vertically; there's also an option to "repeat-x" which repeats the image horizontally; and "repeat" which repeats both horizontally and vertically. Btw, I should mention I just assumed you meant repeat vertically. Just switch "repeat-y" to "repeat" if you wanted it repeated it continually both ways.
  21. "Nothing happens" as in, it doesn't go to the mailer.php script or it does, but nothing shows up? As far as this JS validation goes, all of it can be done in PHP. Also, change <input type="button" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()"> to <input type="submit" class="button" value="Send" name="B1" ONCLICK="javascript:validateForm()"> The original one was asking for a generic button, not a specific "submit", so the form couldn't do anything.
  22. I've been trying to retrieve a query using ASP through Java on an Oracle db, to no avail. With quotes, the query comes up blank; without quotes, the entire query is used. If I rename "symbol" to anything but "symbol", I get an error ("invalid identifier"). It's running on localhost. Any help greatly appreciate. :] <body> <%@ page import="java.sql.*" %> <p align="center"><h1>TRANSACTION SYSTEM</h1> <form action="member.jsp" method=POST> SECURITY NAME (4 Symbols): <input name=symbol type=text maxlength=4 width=20> <input type="submit" value="submit"> <% // try { //Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); Class.forName("oracle.jdbc.driver.OracleDriver"); java.sql.Connection conn; conn = DriverManager.getConnection( "jdbc:oracle:thin:@oracle.cs.luc.edu:1521:orcl","xxx","xxxx"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from security WHERE symbol='symbol'"); %> <table border=2 cellpadding=5 cellspacing=5> <tr> <th>SYMBOL</th> <th>CNAME</th> <th>FNAME</th> </tr> <% while (rs.next()) { String symbol = rs.getString(1); String cname = rs.getString(2); /* String mid = rs.getString(1); String lname = rs.getString(3); String fname = rs.getString(4); */ %> <tr> <td><%= symbol%></td> <td><%= cname%></td> <td><%= cname%></td> </tr> <% } rs.close(); stmt.close(); conn.close(); %>
  23. I knew it, thank you so much!
  24. Hey everyone, I've been trying to use preg_replace to, as the topic states, convert the word "a" to "an" depending if the letter after it is either a vowel or a consonant. I have several versions of code that does either but not both. $testwith = "A orange piece of a paper sheet, a eastern East of a paper sheet."; echo ucfirst(preg_replace("/[Aa][[:space:]]/", "an ", $testwith)); echo ucfirst(preg_replace("/^[Aa][[:space:]]/", "an ", $testwith)); echo ucfirst(preg_replace("/[Aa][[:space:]]+[aeiouAEIOU]/", "an ", $testwith)); These are the outputs: 1. "An orange piece of an paper sheet, an eastern East of an paper sheet.", so all a's to an's. 2. "An orange piece of a paper sheet, a eastern East of a paper sheet.", so replaces first word only. 3. "An range piece of a paper sheet, an astern East of an paper sheet.", so it replaces the proper a to an, but also removes the vowel. I tried doing this also: if (preg_match("/([Aa][[:space:]])+[aeiouAEIOU]/",$testwith)) {//first check if there is a match of a + vowel echo ucfirst(preg_replace("/[Aa][[:space:]]/", "an ", $testwith));//then replace the a to an } but that also converted all the a's to an's. Is there some way to do this without replacing the vowel; or, if necessary, split up the query? I know it's a simple thing am missing. Thanks for your help!
  25. Change this: $result = @mysql_query ($query); // Run the query. to this: $result = mysql_query($query) OR die(mysql_error()); And this: $row = mysql_fetch_array($result)); To this: $row = mysql_fetch_array($result, MYSQL_ASSOC); That ought to do it. You were grabbing the data, but you weren't telling the db how you were (ie: $row could either be MYSQL_ASSOC (by the name of the row) or MYSQL_NUM (by the number of the row as it is in the table)).
×
×
  • 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.