Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. $_REQUEST[] is not being assigned the values you think it is - trace back how you are assigning these values and you will find the problem.
  2. First thing you should do is properly normalise your data structure - you have used a single table where you should have used 4+ of them. As it stands you're in for a world of hurt trying any advanced queries on that thing. however, using SELECT (only the field names that you need) FROM tblriskassessmentdatabank GROUP BY RiskMitigation, RiskConsiquence, SubHeading should get you the data that you are looking for in a format that you can present as you want. But I strongly recomend that you fix the tables before going any further.
  3. The code you have looks like it should work as is, you will need to assign the elements ( bit after the ->) to variables if you want to do things the way you are trying (so $img_url = $row->ImageURL), or change the mysql_fetch_object() to mysql_fetch_assoc() and use a while loop to run through the values. if you just want to use the current code in the href this should work: <tr><td><b>Image</b></td><td><a href='{$row->ImageURL}'> <img src='{$row->ImageURL}'></a> assuming that you want to link to the image, but I don't see any other refference to a URL that you want to follow.
  4. You will be best to follow Brands suggestion, otherwise you are going to need a huge amount of contional code to extract what you are looking for. Another reason would be that the table is clearly not designed properly if that is how the information is stored and what you are wanting to retrieve from it.
  5. Why not just use your browser to save the page?
  6. ...so you're running a query - within a loop - within a query - within a loop - within a query?? are you mental? That's so far from best practice it won't even be able to see it on the horizon! You only need one single query to do what you are doing with potentialy thousands of them. Please post up your table structures if you would be so kind.
  7. I assume that comments.msg_id_fk = meassages.id_fk - and allso that the use of _fk is reffering to Foreign Key What are messages.id_fk and a comments.id_fk actualy refferencing and how are they populated? Also, you shouldn't really have username in the messages table, and if you do it should really be the same wordlength as it is in the users table.
  8. +1 Post up a full breakdown of your tables and we can help you much better. You said in your first post that there were 3 columns in your message table and then have code latter on linking to a cloumn that was not listed as being in there. we need to know what you are storing in the tables to tell you how to retrieve it propperly.
  9. what is the EXACT problem? what are you getting out that you are not expecting and what are you expecting that you are not getting out?
  10. I don't see anything in there that has to do with dates, I don't understand what you are trying to do.
  11. for loops may be his friend - but short tags won't be keep using <?php not <?
  12. if it is the full URL for the immage that is stored in the database then all you need is: echo "<td><a href='{$row['ImageURL']}'> <img src='{$row['ImageURL']}'> </a></td>"; this will take you to the image, replace the value for href= if you want to go some place else.
  13. +1 and without the code there's pretty much nothing we can do.
  14. Not really - your script is stored and run on the server before it is sent to the EU. Thus, getting access to the code on the page is pretty hard to do. however, if you start sending information too and from the server in a plain text format - then life gets easier for whom ever it is that would want to screw you over in the first place (its 99% kids with too much time and too little respect).
  15. your problem is actualy in here: "../scripts/connect_to_mysql.php" this page is overwriting the value of $username with your database account username. be carefull about the names you give your variables. change $username = 'root' and mysql_connect($host, $username, $ password) so that they do not use the variable $username, but rather use $db_usr
  16. let's see what code you have so far.
  17. you still havn't closed the braces round your INSERT values. Could you highlight what you added and let us know what it is doing now? cheers
  18. ok, you're a little off center here - You have told the form that it is using POST, so you don't need to check for $_GET. You have 2 fields in your table, but refference a third in your WHERE condidtion. You're variables are not being deffined as you are checking for (isset($_POST['log_number'])) which does not exist in your form.
  19. glad you got there in the end , I havn't used WAMP before, but I may take a look at it soon and see what it's like.
  20. That's not PHP, that either Javascript or AJAX deppeding on exactly what source you are using for the textbox. Quick question though - why bother putting the contents of a select box into a text box on the same form?
  21. It is never "better" to use SELECT * - you are wasting resources, opeinging up security vulnrabilities and giving up control over the data that you are retrieving - thus reducing scalability of your query. Just don't do it.
  22. Keith, you're a STAR! worked perfectly. Although I'm still not sure where the 4700 was coming from, so I'm going to spend a couple hours working through the code to see if I can see what exactly I did wrong. After that It's onto the real fun stuff of pulling the user name of the last comment posted from a cross ref table on user ID only when the CASE returns 'Yes'. Anyone know if you can nest CASE statements?
  23. @ maxudaskin - if you Like my sig you should follow the link on Nightslyr's (he posted neer the beginning of the thread.
×
×
  • 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.