Jump to content

mikefrederick

Members
  • Posts

    247
  • Joined

  • Last visited

    Never

Everything posted by mikefrederick

  1. I don't think the site has had 30 visitors at once thus far, and each file has: require 'connectionfile.php' at the top and does not open any other connections except for in that file. Weird right?
  2. I just launched a new site on bluehost and I have gotten the error: mysql_connect()...Too many connections in... Bluehost says the max connections is 30 and I don't have access to change that. All of my files close database connections at the end of the file. That being said, I don't have many users yet and this problem worries me. Any insight/suggestions?
  3. I have two fields, wins and losses, in my table. I want to order the results by wins - losses. Is there anyway to do this from within the mysql_query? Calculating the difference between the two fields would be easy afterwards with php, but since I want to order the results by the difference I am looking to do something like "select whatever as"...
  4. Yeah I know, but is it even possible to check for new emails via cron jobs?
  5. I don't even know how I would setup a cron job to check for new emails. And I feel like there has to be another way. Basically, I have a message board on a website. When someone is sent a message, it is forwarded to their email address. I want people to be able to respond to emails directly from their email address. In other words: -they send a reply email (to something like messageboard@mysite.com) -the contents of that email are stored in the database so that the message board is updated -the original message sender's email address is grabbed from the database and the email is forwarded to that email address
  6. Hopefully someone can help me here. I am wondering how to go about updating some tables in my databases when my server receives an email. For example, if I wanted to submit the body of the email into a database, how would I go about doing this? Directions, a link to a guide, or any help is appreciated. Thanks.
  7. Hopefully someone can help me here. I am wondering how to go about updating some tables in my databases when my server receives an email. For example, if I wanted to submit the body of the email into a database, how would I go about doing this? Directions, a link to a guide, or any help is appreciated. Thanks.
  8. I just grabbed a time from my database that was put in there a couple days ago using strtotime(date('m/d/Y')); When I echo date('m/d/Y',$grabbed_date); I get today's date. BUT, when I echo strtotime(date('m/d/Y')); it does not equal the grabbed date. Why is this?
  9. yeah i know, but in FF3 it actually was doing that. this was right after it came out, i am going to test it again.
  10. I am building a site where users need to be able to reset there passwords. The passwords are stored as md5, and when they click 'reset password' an action is run to grab a random string and set that as the password. The problem is that when they click reload on the page that the script forwards to, the script is run through again and so the password is changed again. Right now, I am taking the random string and using base64_encode and putting it in the URL. I wish I could just grab the password from the database, but that's not possible with md5. What's a good way to handle this?
  11. making a site w/ users. upon signup I want to check if a username is taken and if it is I want to add a 1 to the end of the username, check again, if that one is taken add a 2, and so on until the username is not taken. whats a good approach?
  12. if you're not careful hackers can alter the email itself as well, including the headers. mostly i was wondering what the advantage of image verification vs. a hidden field is? there must be one because everyone uses image verification, but a hidden field is more pleasant for the user.
  13. what is the best way to prevent spamming from your html forms? what about adding a hidden field and not sending the email if the field is filled?
  14. yeah i mean when you edit a file you don't edit it based on a get variable so that won't have any effect
  15. no you can't use include like that, check out file_get_contents
  16. this will be run: if ($error == ('yes')){ echo "Error Wrong Password<br>"; } because as soon as $error='yes'; you leave the page do header('Location: npage.php?error=1'); and then in npage.php do if($_GET['error']=='1') echo 'Error Wrong Password';
  17. you can't put include in an array like that...what is $main?
  18. ya darkwater prob has a better idea
  19. var divIDs= new Array; function update() { var divID=dobj.id.substring(3,4)-1; divIDs[divID]=[dobj.style.height,dobj.style.width,dobj.style.top,dobj.style.left]; } function formsubmit() { var infostring=divIDs.join('$$'); document.getElementById['info'].value=infostring; then enter the value of info into the database and break up the array into the correct variables when the page loads.
  20. you could create another hidden form element called div_name2 and use the following (you will have to record the div_name2 in the db as well): function update() { var divID=dobj.id.substring(3,4); if(divID=='1') { document.getElementById('div_name').value = dobj.id; } if(divID=='2') { document.getElementById('div_name2').value = dobj.id; } document.getElementById('height').value = dobj.style.height; document.getElementById('width').value = dobj.style.width; document.getElementById('top').value = dobj.style.top; document.getElementById('left').value = dobj.style.left; }
  21. yeah, shouldnt be that hard, how are you recording the dragged div? seeing code would help
  22. few suggestions $tapenum = $_POST['tapenum']; $client = $_POST['client']; $system = $_POST['system']; $area =$_POST['area']; $lineid = $_POST['lineid']; $flow = $_POST['flow']; $dataset = $_POST['dataset']; $comments = $_POST['comments']; $current = $_POST['current']; to extract($_POST); //neither way is very secure, you should be using mysql_real_escape_string echo '<a href="index.php">HOME</a>&nbsp&nbsp&nbsp'; echo '<a href="insert.php">INPUT</a>&nbsp&nbsp&nbsp'; echo '<a href="search.php">SEARCH</a>&nbsp&nbsp&nbsp'; echo '<a href="viewdb.php">VIEW ALL</a>&nbsp&nbsp&nbsp'; echo '<a href="viewcurrentdb.php">VIEW CURRENT</a><br><br>'; -->no need to break up these lines $starttext $tapenumtext $clienttext $systemtext $areatext $lineidtext $flowtext $datasettext $commentstext ->you could compress these all to one variable instead of $clienttext="client LIKE '$client%'"; use $tapenumtext.="client LIKE '$client%'";
  23. I am writing an xml file using php. The top of the file starts sets a database connection and then specifies the content type as xml. This is fine...and I have been able to write the entire file as xml. But in a different file I need to urlencode the contents of the file. I tried using urlencode(file_get_contents($file)) but the actual php lines within the xml file are showing up, I just want the xml document as it would be shown a browser. How shoud 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.