Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. Remove the refference to any fields that you want to have set to their default values from your insert and update statements. only include the fields that you are actualy adding information to directly.
  2. Yeah, but that's not how you want to sum the values, it's much better to do it in the SQL beforehand, rather than run through a loop.
  3. Nothing? If you want to unset a variable you use unset, what's the problem? You want to make the value of $age = ___? put it in quotes like you would any other string value.
  4. That depends on if you want the $new_balance variable upadated with the value of $deposit every time a record is returned by the query (put it inside the while{}), or if you just want the $deposit added once to the last value of $balance retrieved from the database (put it outside the while {}). What I expect you are trying to do, and where the confussion is coming from, is that you want to sum the balance and then add the deposit. if that is the case then neither code snipit is going to work.
  5. Try moving echo " totaal: $totaalPrijs"; outside the while{} loop (at the end)
  6. you could try more brackets: if (( $_GET['action'] != "login") && ($_GET['action'] != "logout") && (!$_SESSION['username'])){
  7. This kind of thing is already done quite well by programs such as SAP and Sage2000. Is this a personal progect or are you planning on something that is comercialy viable?
  8. If you're looking for a PHP script, wouldn't it have made more sense to post in the PHP Help section instead ? What field type is total just now? and what type of duration are you reffering to by 14:00? hours or minutes?
  9. sooo......not a fault in the explode at all then
  10. and what happens with the code I posted?
  11. while html pages can not run php, php pages can handle html quite naturaly. using an Iframe is an option if it's what you want to do.
  12. You can't run php from a .html file. You need to change the extensions for the server to know that it has to run scriprs on the page.
  13. I don't care , the only reason to use SELECT * is because you can't be bothered typing in the field names. Now, does the page source show anything where the php should be?
  14. .htaccess is what controlls web directories on apache sevrvers, but not all hosting companies let you play with them (something of a headache from their point of view) I still stick with the renaming links, and with a clever text editor using a find&replace you should speed things along. (of cource if you had included .html in all your links, even notepad could have handled the find&replace)...come to think of it - with the right folder permissions, you could write a php function to rename all the links in all the files....would take longer than doing manualy though
  15. another example of lazyness is using SELECT * (especialy when you are only echoing a single field!)
  16. depends how much access you have on your server. however I would recomend putting in the extensions regardless.
  17. that the default value on the DB was over written meens that something is happening that is assigning a value to these second and third students. Have you checked what happens if you choose yes to additional students, fill in some info, and then change it back to no again for the final submition?
  18. well with that being the case, all I can suggest is that you could reverse your TRY statement, so that it checks for the criteria exactly matching and throws the exeption for everything else, and you could have a shot with using set_time_limit() to controll the timeout errors that way, But it's not something I have ever used, so I can't advise any more than that.
  19. that's not the best practice, you should assign your SQL string to a variable and then execute the mysql_query() against the variable. try this: $qry ="INSERT INTO ".$c[1]." (seed, desc, img, vid) values('$seed', '$desc', '$final', '$vid')"; mysql_query($qry) or die($qry.'<br>Failed to run due to the following error :<br>'.mysql_error()); and see how you get on.
  20. ok....what is the function/procedure that is going to cause the time out?.....and why are you using it if you know it won't work?
  21. All HTML has to be formated using tags, whether on a page or in an email.
  22. going to need to see what's inside $frm_content
  23. if you are using GET then just take the parenthesis out of the url. e.g. URL = http://results.php?product=football&price=1-100 | then on results.php have the following: $product = $_GET['product']; $price_range = $_GET['price']; //.............REST OF PAGE Although, I'm getting confused (yet again - happens a lot these days) You are talking about sorting by price, but are passing information that would be used as a filter, rather than a sort
  24. is there a reason your not using POST and a form?
×
×
  • 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.