Jump to content

denno020

Members
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by denno020

  1. You could swap the 1939 and 2012, then have the variable decrement? $i = 2012; while($1 > 1939){ $i--; echo 'whatever'; } Denno
  2. if(mysql_num_rows($result) == 0)){ redirect("../index.php");} elseif(mysql_num_rows($result) == 1){ redirect("../welcome.php"); } That will count the number of entries that is returned from your query string. This should either be a 1 or 0, unless you have an error in your database somewhere..
  3. let me know ur skype name when you've got it up and going..
  4. any chance u can download skype? If not I'll try and make do here..
  5. do you have skype or anything so I can talk to you through your code? Might be a bit easier than constantly replying here..
  6. sorry mate I got distracted watching a tv show.. I'll look through it now.. I'm only looking at your query and while loop really, just wanted to see the placing of the {'s and }'s.. I'll reply in a sec
  7. can you post your whole php file..
  8. do you get any output at all?
  9. This is how you would usually set up the loops to create a table (psuedo code): <table> while loop condition { <tr><td> //add content to the table cell </td></tr> }//close while loop </table> That code will create one table, will multiple table rows, each with only one column.
  10. Looking at the excerpt of code, you never open the table tag? And with the closing tag where it is, it looks like you're going to close a table everytime the loop runs.. You want the opening and closing table tags outside of the while loop..
  11. You could do three things. One, send the variables back by appending them to the URL of queue_info.php. For example queue_info.php?id=5&from=user, then inside queue_info.php, you access those variables using $_GET, exactly as you've used $_POST. This means that the user will see all of the variables and their content, which may not be wanted. You could use javascript to submit another form on the queue_action.php page. Submit it to queue_info.php and access using $_POST again. Or the third is using session variables, which will then be accessible on any page in your website.. Hope that helps a little.. Denno
  12. Just google tutorials, or youtube tutorials. It'll allow you to send a request to the server to be processed by PHP (which is where your mysql query will run), and then return the result to the browser, to a div you specify, all without refreshing the page, pretty sweet . Exactly how comments on facebook appear in real time, using AJAX (I assume) Denno
  13. AJAX is exactly what you're after Denno
  14. You could make the form submit to the property list page, have code at the top of the page to determine if a form has been submitted, then add the entry to the database, then as the page continues to process, it will pull all the entries in the database, including the newly added one, and display them on the page. If you want this to happen without the page appearing to refresh, then you will need to use AJAX. Which I'm pretty sure JQuery makes very easy, just look for some tutorials on it. Hope that helps somewhat.. Denno
  15. your wrapper is wider than your container? What's up with that?
  16. If you make img a block element, and then use margin: auto, that will centre the image. img{margin:0 auto; display: block;} try that
  17. I don't know the exact code, but I know there are PHP functions that allow you to make a variable into a 'date' variable, so PHP will recognize it as a date, and not as a strings of characters. After that you might be able to do some sorting using greater-then, less-then etc, but I'm really not too sure on that..
  18. Ok thanks for the replies.. We are using a txt file as our 'database', where we were checking the usernames and passwords, so I guess I could just create a new txt file in a similar way.. Thanks Denno
  19. thanks for the reply... Using a database, however, is well above the scope for this practical.. Is there anything simpler that I could use? I don't think there is a huge need for it being secure...
  20. I've got a somewhat simple problem I think.. I'm working on a uni practical, and one of the checkpoints is to limit the number of incorrect login attempts to 2. I know I could do this very easily with session variables, however on the practical sheet, it says that we're not allowed to modify any of the partially implemented code. So I was wondering, what other ways are there to track the number of incorrect logins? If it comes to it, I will just use session variables, as it's pretty much the most sensible way I'd imagine.. but would like to know of any other possible ways.. Cheers Denno
  21. I was wondering how I could make the footer appear at the bottom of the browser for pages where there isn't enough content to cause vertical scrolling. I want to implement it on a search results page, so when there are very few results, the footer will be attached to the bottom of the browser, however when there are alot of results, then the footer is pushed all the way down to the bottom of that data, as per usual. I have tried positioning the footer absolutely, with bottom:0px;, however that causes the footer to stay there even when there is enough content to push the footer down.. Thanks in advance. Denno
  22. I think you need a double equals? ($data == $list) Otherwise you're saying "move contents of $list into $data", and that doesn't really make sense as the condition of a while loop.. Denno
  23. Can't you just use count() to see the size of the second array, and then use that value as the terminating value for a for loop. Something like: for($i = 0 ; $i <= count($arrayOne); $i++){ $arrayTwo = $arrayOne; } Please excuse any syntax mistakes, it's been a little while since I've done PHP programming, so I may have written that in a Java type format by mistake.. But that should be the general idea I would think. Hope that helps Denno
  24. Are you supposed to be using curly braces instead of square braces?? Denno
  25. I just have to let you know that it's past 4am here, and I'm going to bed.. When I wake tomorrow, I will look at your problem some more and offer some more suggestions (of which I already have a few, but I want sleep). From the looks of it, its homework of some sort, so I'll let you continue to work on it and see if you can't fix it yourself. I would suggest youtube videos and Google. Some things to think about: where does the information come from the user that is then used to query the database? (so where does the user put in their username and password?) That's all for tonight. I should post back tomorrow at some point, if not then the day after.. Denno
×
×
  • 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.