Jump to content

Ell20

Members
  • Posts

    337
  • Joined

  • Last visited

    Never

Everything posted by Ell20

  1. Thanks for your answer but I dont want to close the popup on the user. I want them to click the link, then the pop up displays. Then if they close the popup within 3 seconds then allow it, but display a message saying "Vote not counted you need to vote before closing the window" Thanks
  2. Hi, I have been dabbling in PHP/MySQL for a month or two now so I know a little bit about it. However I have come across something which I am unsure how to do so I was hoping you guys/girls could help me. I am helping a friend run a MMORPG (Online Game) and basically we want our users to vote for our site on gamer websites so that we become more popular. Now we have added ourselves to these voting site we are given a direct link to give to our users to vote. Now I need to: 1) Count the vote when they vote and add it into the database. 2) If they dont vote and they just close the pop up then dont count their vote. I am very unsure on whether number 2 is possible, if its not, would it possible to have a timer, so if they close the window within 3 seconds then they dont get their voted counted? Appreciate any help with this Elliot
  3. Yeah but I mean it dosent even navigate to the logout.php page now which is just supposed to display "You have successfully logged out". Cheers
  4. Thanks for help. There are no errors now but it dosent appear to do anything now, any ideas? Cheers
  5. Hi, I have the code below, which used to work fine, however I have just changed hosts and now I am getting 2 errors: <?php if (isset($_SESSION['admin'])) { header ("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "index.php"); ob_end_clean(); exit(); } else { /* If user is logged in */ $_SESSION = array(); session_destroy(); setcookie (session_name(), '', time()-300, '/', '', 0); } ?> Errors: Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/prioryfi/public_html/logout.php on line 11 Warning: Cannot modify header information - headers already sent by (output started at /home/prioryfi/public_html/logout.php:11) in /home/prioryfi/public_html/logout.php on line 12 Appreciate any help
  6. Man no offence but you dont have a clue what your chatting about. If you can read/answer what im asking then there isnt much point in you answering.
  7. I just want to upload the video file to the server but I want to check the file type before I allow it to be uploaded? It dosent matter want I want to use the video for after its uploaded I just want it to be uploaded but obviously I dont want people uploaded .pdf files etc so I believe there is a php command where you can do something like this: ($_FILES['moviefile']['type'] == "video/wmv") But I wanted a list of all the possible types if possible Cheers
  8. Hey, I dont want to play the movie, I simply want to upload it. Does anyone no the types for videos like video/wmv etc? Thanks
  9. Hi, Im in the process of creating a video upload script however I wondered if anyone could point me in the direction of a list of the video upload types. By this I mean like for images you have: image/jpeg, image/gif etc. What are the video equivalents? Thanks for your help
  10. Yes, but what does that mean? Thanks
  11. Nope its not for a cron job, its used to get contacts from say MSN, Yahoo etc...
  12. Hi, I keep getting the following message when I attempt to use CURL: Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/streety/public_html/grabbers/grabbers/msnm/msn_contact_grab.class.php on line 372 Can anyone assist? Thanks
  13. Thanks alot, works a treat. Is there any reason why the original dosent actually work in IE? Cheers
  14. Hey I have the following code on a drop down box so show a popup warning if the bottom option is selected. It works fine in Mozilla but in IE it dosent appear to do anything at all: <select name="acctype"> <option selected="selected" disabled="disabled" value="">Select Account Type</option> <option value="day">1 Day Account (<?=$interest?>%)</option> <option value="week" onClick="return confirm('Putting your money in a 1 week account means you cannot withdraw\n any cash until the week has passed.\nAre you sure you want to do this?');">1 Week Account (<?=$newinterest?>%)</option> </select> Thanks for help with this.
  15. Hey, Thanks for the code, it still works for the first click, in which it turns red. However if the cell is already red and you click again it dosent appear to do anything? Thanks for your help
  16. Thanks for your very helpful response haku. If you cant contribute anything useful, dont contribute at all. I thought it would be a simple case of just adding some kind of if to say if the cell is red turn it white. Can anyone help with this?
  17. Hi, Thanks for the reply, it may work, but I am trying to incorporate the additional part in to what I already have as that is working seemlessly. Is there anyway to add to the script that I already have in place? Cheers
  18. Hi, Thanks for the code but it dosent appear to do anything when you click on a already selected (red) cell. Edit: Just realised that it seems to be making every other cell white. Its suppose to make them red to start with, if the cell is already red and its clicked on again its suppose to go white. Cheers
  19. Hi, Thanks for the help, I am not really familiar with Javascript and only no very little. I wanted to be able to incorporate it into the current javascript I have, here is the full code: var nums = 1; var highlightbehavior="TD" var ns6=document.getElementById&&!document.all var ie=document.all function changeto(e,pickId){ source=ie? event.srcElement : e.target if (source.tagName=="TABLE"){ return; } while(source.tagName!=highlightbehavior && source.tagName!="HTML"){ source=ns6? source.parentNode : source.parentElement } if (source.id!="ignore"){ if(nums <= 10 && (document.getElementById('num' + pickId).style.backgroundColor != 'red') && (document.getElementById('previouslySelected').value == 0)){ document.getElementById('value' + nums).value=pickId; document.getElementById('num' + pickId).style.backgroundColor='red'; nums++; } } }
  20. Hi, I have a script which has the following code: if(nums <= 10 && (document.getElementById('num' + pickId).style.backgroundColor != 'red') && (document.getElementById('previouslySelected').value == 0)){ document.getElementById('value' + nums).value=pickId; document.getElementById('num' + pickId).style.backgroundColor='red'; nums++; } The above script basically changes the background colour of the TD cell to red when clicked. I wanted to add some code so that if the cell had already been clicked it turned it back to white. Here is my attempt, however it dosent appear to do anything, can anyone direct me as to where I am going wrong? if(document.getElementById('num' + pickId).style.backgroundColor == 'red'){ document.getElementById('value' + nums).value=''; document.getElementById('num' + pickId).style.backgroundColor='white'; nums--; } Thanks for any help
  21. Can anyone help? If this is the wrong part of the forum could someone please move it, thanks.
  22. Hi, I have a script which has the following code: if(nums <= 10 && (document.getElementById('num' + pickId).style.backgroundColor != 'red') && (document.getElementById('previouslySelected').value == 0)){ document.getElementById('value' + nums).value=pickId; document.getElementById('num' + pickId).style.backgroundColor='red'; nums++; } The above script basically changes the background colour of the TD cell to red when clicked. I wanted to add some code so that if the cell had already been clicked it turned it back to white. Here is my attempt, however it dosent appear to do anything, can anyone direct me as to where I am going wrong? if(document.getElementById('num' + pickId).style.backgroundColor == 'red'){ document.getElementById('value' + nums).value=''; document.getElementById('num' + pickId).style.backgroundColor='white'; nums--; } Thanks for any help
  23. Excellent, thats solved that! Thanks alot for your help! Couldnt of done it without your help, or would of taken me alot longer with much more code!! Cheers
  24. Ok, I have managed to work out that this happens when there are no matches (purple). However I am unsure on how to stop this occuring? Cheers
  25. Having tested it quiet a few times, every so often I get this error: Warning: Invalid argument supplied for foreach() in /home/streety/public_html/keno.php on line 43 Then the following printed lots of times: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/streety/public_html/keno.php on line 91 Any ideas what might be causing this? Cheers
×
×
  • 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.