Jump to content

White_Lily

Members
  • Posts

    531
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by White_Lily

  1. Thank you Printf worked, however money_format() apprently doesnt exist, and it broke the rest of the script.
  2. Christian is right, it generates a value whether theres a post input or not, also - just writing if($variable) does check whether there is a value or not. Its just easier than writing if(isset($variable))
  3. As I said in a different topic ive never killed my script after a header - since not killing has worked for me so far i will continue not killing scripts until something goes wrong.
  4. I have a CMS and it has a Commerce section, what I need it to do is calculate what the product price is, including VAT. I have written the function that does this, however the problem Im having is its outputting the wrong (in terms of decimal places). here is the function: //Price + VAT function getPriceVAT($price) { $vatValue = 20; $vat = $price / 100 * $vatValue; //Therefore price including VAT = $priceIncVAT = $price + $vat; return $priceIncVAT; } here is how im outputting it: echo '<td>£'.getPriceVAT($getFig["product_price"]).'</td>'; It calculates it correctly but to only 1dp. which outputs: £2.4 instead of: £2.40 how can i correct this?
  5. hmm... ive never killed the script after a header, always worked fine without it
  6. What i wanna know is why hes killing the script after the header line? why kill it if they aren't even on that page anymore...? lol
  7. So how come all the other login forms ive written check if the form is empty, yet this one skips it completely?
  8. Hi, i wrote a login form with some validation - problem is it is skipping the first part of the validation where it checks if the form had any data entered in the first place... $sub = $_POST["submit"]; $username = $_POST["username"]; $password = sha1($_POST["password"]); if($sub){ if(!$username && !$password){ $err .= "You tried to login without providing the informtion required."; }else{ if(!$username){ $err .= "Please enter a username."; }else{ if(!$password){ $err .= "Please enter a password."; }else{ $getLogin = select("*", "users", "username = '$username'"); $get = mysql_fetch_assoc($getLogin); if($get["username"] != $username){ $err .= "The username didn't match the database."; }else{ if($get["password"] != $password){ $err .= "The password didn't match the database."; }else{ session_start(); $_SESSION["username"] = $username; $_SESSION["password"] = $password; $_SESSION["user_level"] = $get["user_level"]; header("Location: main.php"); } } } } } echo '<div class="error">ERROR: '.$err.'</div>'; } can anyone see why? (it goes straight to checking the username field rather then checking the entire form)
  9. Someone said that instead of sending the PM's to an email address (which is what i thought i would have to do) they said you had to do it by username, which i think i have figured out, so now all i need is to get the the forum itself, and the pm system to determine whether or not a user has read/ not read a topic and/or pm.
  10. Its not just the pm system >_> its the actual forum part aswell - like the topics are they read/unread?
  11. Okay - so how do I get it to update the database when the person clicks the topic link to mark it as read?
  12. Have you read what I said? The forum doesn't have a read/unread system yet... Telling me its the same sequence for a read/unread topic doesn't help - because there is absolutely NO read/unread system in the forum at all. That's why I'm asking how I go about it.
  13. The Avatar upload process I'm guessing would usually happen when all the details are being processed and inserted into a database (or this is how I have always done it).
  14. The point of me asking is that the forum doesnt have a read/unread system yet - otherwise, as you said, i would already have what i need.
  15. Okay so following this - how do I go about doing an unread, read system?
  16. So what your saying is, is that Hotmail Inboxs are not emails... they are private messaging systems?
  17. Okay - I'm looking for something like this forums email system... where you have an INBOX (or so this forum has called it). If that doesn't explain it then I'm not entirely sure what does...
  18. 1) You asked what forum software doesn't come with a PM system. 2) Yes, I created my forum, it is in PHP and I have no idea how to create an EMAIL system. A simple inbox is all that's needed >_<
  19. @trq: That's the thing... I don't even know where to start haha. @darkfreaks: I mean like an email inbox system. Not a private Messaging system - my fault for not specifying sorry.
  20. Hi, I have decided i want to be able to create a mail box to attach to my forum so that members can send "emails" to eachother, ive tried searching the internet to no success and was wondering if some people on here could point me in the right direction.
  21. Just to add to the problem of only letting the first user log in, he only has to add to the query: $query = mysql_query("SELECT * FROM members WHERE username = $username");
  22. Plus i dont know what his database passwords are stored as, its like assuming they are sha1 when they could be md5...
  23. If its so bad jessica, post a better one.
×
×
  • 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.