Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. can you give an example of what you want your code to look like or what you want the output to look like, if you enter in a specific number (like 4)
  2. table-row (or any of the table display types) is not supported by IE
  3. increment a separate variable instead of $i... $i = $_POST['number']; while ($x < 50) { //code here $x += $i; }
  4. can't help you without seeing your (relevant) code... in general though, the query will have to be run every page load. The point of pagination is that instead of retrieving all of your rows every page load, you narrow it down to a specific range, depending on what "page" you are on. So if you want to for instance show 10 rows per page, and you are on page 1, the query will be the same, but you would create a limit of 0,9. Page 2 would be a limit of 10,19, etc... so the same query is being run, just the limit is changing. If it is a complex query that you do not want to be running every time, I would suggest looking into either initially grabbing the data and putting it into a flatfile or array and basing the pagination off of the flatfile or array (instead of querying the db every time), or having another (temporary) table in your database that is populated with the results of the initial query, and basing your pagination off that.
  5. Alright. The moral of the story here is that when you come to a forum to ask a question, don't be so hasty to disregard solutions given, as you clearly aren't in the know, yourself (otherwise you wouldn't be asking the question in the first place). And it's definitely not a good idea to be an ass about disregarding it, because karma is a bitch. I'm closing this thread before it gets ugly.
  6. you would need to use ajax (js) or flash to make it "real time." You would need to store the chat text in a central place so that when someone writes something, it can be displayed for everybody. If you don't want to store the info in a database, your only other option is with a flatfile. perhaps his hosting does not allow him to have a db?
  7. thebadbad's code does what you asked. It highlights the stuff between the code tags, wrapped in the styling you want. If you had bothered to try it out, you would have seen that it does work. the main thing to note is that he added the e modifier to the pattern so that the replacement will actually evaluate and execute the syntax highlighting.
  8. Well you also assume that just because someone calls himself a programmer, that somehow makes them a good programmer.
  9. I simply restated what you already stated yourself. If I wanted to criticize you, I wouldn't have offered a solution.
  10. Come on man.. even within the programming world, just because you know php doesn't mean you automatically know any other language out there. You simply have one up on the person who's never programmed at all, because you understand the principle better. But that doesn't mean you know the syntax. Or with spoken language. I can be very good at speaking English. That doesn't mean I suddenly know how to speak French. And these examples are restricted to similar playing fields. Why would you assume that a programmer has the common knowledge of computer parts and how to assemble them? Software and hardware are two different things. You might argue that a programmer might be more likely to read relevant documents and systematically go through the steps and pay attention, but knowledge in one thing does not equate to knowledge in another thing.
  11. oh come on though, you have to admit the built-in web developer thing that kind of resembles firebug is pretty cool. And the backwards compatibility button that renders the page as IE7.
  12. Well that's an easy answer: when you go down to the store to buy a computer, what OS comes standard on it 99.999% of the time, and has come standard on a computer for the last 100 years?
  13. I think the manual is a lot more specific than I could ever be...did you scroll down and look at the examples?
  14. If you're constantly "accidentally" deleting important files, the likelihood of you continuing to do so even with a confirmation dialogue is probably still pretty high (no offense...). I would suggest for you to instead of deleting the file, have your script move it to a folder called "pendingdeletes" or something. That way if you "accidentally" delete it, you can go retrieve it.
  15. dude open your eyeballs. There's a ! before the isset.
  16. What is there to explain? You do the exact same thing you did with your other conditions, except for if(!isset($_POST['submit'])) { // query and display default stuff here } Do you not understand your own code?
  17. no...you would just check if it's not set one time, and run a query and display something one time. Doesn't really matter where you put it, because it's either set or it's not.
  18. okay so I see a lot of conditions that involve seeing if $_POST['submit'] is set. So make a condition and run a query based off if it's not set. Maybe as a next step you can re-think your coding in general and figure out how to combine all that repetitive code...
  19. You know, making a basic file browser isn't really that hard. Most of the work would really involve making it look pretty. There are a million examples throughout the manual for recursively going through directories/subdirectories with different functions (pretty sure I saw a bunch in readdir, maybe one or two in glob, as starting points).
  20. has the universe been turned upside down? That sounds like something IE would be guilty of.
  21. okay well looking farther down your code, you perform the query but you don't actually retrieve anything from the result source. $get_report is the result source from your query. You need to use a mysql_fetch_xxx function to retrieve the data from it. Usually people put it into a while loop. I see you have $data[...] inside brackets. Looks like you somehow managed to lose your while loop. It probably looked like this: while($data = mysql_fetch_assoc($get_report)) That would go just before the {
  22. document.form1.lastName.value specifies a form field with an id of 'lastName'. Also, document.form1.lastName.value is javascript, not php, so php will not recognize/parse that. To pass a form value to the server (and to php) You need to use the name attribute in your field. So for example: <form action = 'somepage.php' method='post'> <input type='text' name='lastName' /> </form> the value would be received at $_POST['lastName'] You can use an javascript to grab an element's value by id, but the field has to have the name attribute for it to be sent to the server and recognized.
  23. You're still missing a comma after teamname and you also have a comma after contact and MD that shoudln't be there.
  24. You also need to select more than one column from your table (you still have to change $table as MasterACE mentioned). In your query, you're just selecting a single column: columnname. You can specify all of the columns you want to select by doing select column1,column2,column3 from table or select them all by using * select * from table I would not recommend using * unless you really are using all of your columns, though. Should only select what you are going to use. Less work for the system = faster execution time.
×
×
  • 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.