Jump to content

jbingman

Members
  • Posts

    98
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jbingman's Achievements

Member

Member (2/5)

0

Reputation

  1. yeah i didnt think so but it was worth asking cause it would save a lot of code. thanks though.
  2. Is there a way in CSS to make a certain character say... * asterisks * in their own style?
  3. ok i got that to work but now its just not sending any email to the email address. and is there a way to add 2 emails for the contact info to be sent to?
  4. <?php $link = "<a href='/contact.php'>Click here to go back</a>"; if(!$name || !$email || !$comments) { echo "<font color='red'>Please fill in all fields</font><br />"; echo "<form action='action.php' method='post' name='contactform'> <table height='194' bgcolor='#333333'> <tr> <td width='240' height='521'><font color='red'>*</font>Full Name:<br /> <input type='text' name='name' /><br /></td> <td width='328'><font size='1'><font color='red'>*</font> Indicates Required Fields</font></td> </tr> <tr> <td height='52' colspan='2'><font color='red'>*</font>E-mail Address:<br /> <input type='text' name='email' /><br /></td> </tr> <tr> <td colspan='2'>Phone Number:<br /> <input type='text' maxlength='3' size='4' name='areacode'/>-<input type='text' maxlength='3' size='4' name='3digits' />-<input type='text' maxlength='4' size='6' name='4digits' /><br /></td> </tr> <tr> <td colspan='2'><font color='red'>*</font>Subject:<br /> <input type='text' name='subject'/><br /></td> </tr> <tr> <td colspan='2'><font color='red'>*</font>Questions/Comments:<br /> <textarea cols='50' rows='10' name='comments'>Comment here</textarea></td> </tr> <tr> <td colspan='2'><br /> <input type='reset' value='Reset Form' /> <input type='submit' value='Submit Form' name='submit' /></td> </tr> </table> </form>"; exit; } if(!eregi('^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$', $email)) { echo "<font color='red'>E-mail is not a valid address</font><br />"; echo "<form action='action.php' method='post' name='contactform'> <table height='194' bgcolor='#333333'> <tr> <td width='240' height='52'><font color='red'>*</font>Full Name:<br /> <input type='text' name='name' /><br /></td> <td width='328'><font size='1'><font color='red'>*</font> Indicates Required Fields</font></td> </tr> <tr> <td height='52' colspan='2'><font color='red'>*</font>E-mail Address:<br /> <input type='text' name='email' /><br /></td> </tr> <tr> <td colspan='2'>Phone Number:<br /> <input type='text' maxlength='3' size='4' name='areacode'/>-<input type='text' maxlength='3' size='4' name='3digits' />-<input type='text' maxlength='4' size='6' name='4digits' /><br /></td> </tr> <tr> <td colspan='2'><font color='red'>*</font>Subject:<br /> <input type='text' name='subject'/><br /></td> </tr> <tr> <td colspan='2'><font color='red'>*</font>Questions/Comments:<br /> <textarea cols='50' rows='10' name='comments'>Comment here</textarea></td> </tr> <tr> <td colspan='2'><br /> <input type='reset' value='Reset Form' /> <input type='submit' value='Submit Form' name='submit' /></td> </tr> </table> </form>"; exit; }else{ $name = trim(stripslashes($_REQUEST['name'])); $email = trim($_REQUEST['email']); $phone = $_REQUEST['areacode' . '3digit' . '4digit']; $subject = $_REQUEST['subject']; $comments = stripslashes($_REQUEST['comments']); mail('jbingman@gmail.com', $subject, $comments, $phone, 'From:$name <$email>'); echo "<br />"; echo "<p>Thank you for your comments.<br />"; echo "<a href='contact.php'>click here to continue.</a></p>"; } ?> Here's my script i have for a comment/contact section on my page that isnt working. it wont pass the first if even if i fill in all the fields. its probably something stupid but i dont know PHP inside and out.
  5. So with this method, it would overwrite the number of page views everytime you refresh the page or go to a new one correct? heres an example of what im trying to do.... http://haloboosting.com/ If you look at the Who is Online: section on the right side thats what i want...
  6. Hi, I'm trying to get a code for showing the current number of people viewing the page. It seems like something that would be PHP OOP but I cant find anywhere online to help me. it would just say something like , "[blank] number of guests currently viewing this page" something along those lines. If its not PHP please move this to somewhere I can get this info. THANKS!
  7. im trying to put in content but restrict it to certain pages. The index page, the about us page, and the contact page. I use: if($_GET['page'] == 'index' || 'about' || 'contact') { //content here }elseif($_GET['page'] == 'videos') { //content here }elseif($_GET['page'] == 'graphics') { //content here }elseif($_GET['page'] == 'web') { //content here but that doesnt work. it puts that content in ALL the pages. It works if i take out the other 2 'or' statements in the first if. (the "|| 'about' || 'contact'") Does anyone know why? or how to make that work? thanks.
  8. nevermind we solved it. our copyright bar had a top element in the css which shouldnt have been there. it was causing it to disappear off the screen with 15 content lines. Thanks anyways!
  9. I have a LIMIT on an SQL statement that forces the user to click next/previous if content runs longer than 15. however, we have a copyright bar at the bottom of the page that doesnt show up until the last page of content. Does any one know why? <?php // Determine startrow if (isset($_GET['startrow'])) { $startrow = $_GET['startrow']; } else { $startrow = 0; } $articlecount = "select id from main where section = '$section' and status != 'archive' and status != 'edit' AND status NOT LIKE '%f%'"; $articlequery = @mysql_query($articlecount,$db_conn) or die(mysql_error()); $articlenum = mysql_num_rows($articlequery); $listsql = "select id, monthname(date) as month, dayofmonth(date) as day, year(date) as year, section, date, title, writer from main where section = '$section' and status != 'archive' and status != 'edit' AND status NOT LIKE '%f%' order by date desc LIMIT $startrow, 15"; $listquery = @mysql_query($listsql,$db_conn) or die(mysql_error()); $listnum = mysql_num_rows($listquery); while ($listrow = mysql_fetch_array($listquery, MYSQL_NUM)) { $lid = $listrow[0]; $date = $listrow[1].' '.$listrow[2].', '.$listrow[3]; $section = $listrow[4]; $title = stripslashes($listrow[6]); $writer = stripslashes($listrow[7]); $listcont .= '<span class="regularindent"><a href="?page=articles&id='.$lid.'">'.$title.'</a> - '.$writer.' ('.$date.')<br></span> '; } echo ' <div id="sectionlistwrapper"> Additional '.$section.' articles:<br> <br> '.$listcont; if ($articlenum > 15) { echo ' <span class="addlink">'; if ($startrow >= 15) { echo '<a href="?page=section&section='.$section.'&startrow='.($startrow-15).'">< - previous</a> |'; } else { echo '<span class="disabled">< - previous </span>|'; } if ($startrow+15 < $articlenum && $articlenum > 15) { echo ' <a href="?page=section&section='.$section.'&startrow='.($startrow+15).'"> next - ></a>'; } else { echo '<span class="disabled"> next - ></span>'; } echo '</span> '; } echo "</div> "; } ?>
  10. And can someone explain doctypes? cause ive gone to google and searched but they dont make sense. how do i know which one to use? and could this be causing the problem? my doctype now is: <!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">
  11. yeah, it works for me in safari and in firefox. Is there something with IE that it wont work? I have verified my XHTML with w3. So its just something with the IE browser?
  12. I have had people tell me that my homepage and other pages wont display, just the background blue color. Does anyone else see this? is this a browser issue or does a doctype have anything to do with this? http://www.fresnosar.com
  13. Hi I am trying to retrieve a text block from a Mysql database and display it inside of a <textarea> how do i do this?
×
×
  • 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.