Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Here's an easier format for ternaries, which is really the point of them. $name = empty($_POST['name']) ? '' : $_POST['name']; Doesn't matter how you display it. You can use the same variables and data to put in the CSV file. Maybe I'm misunderstanding but your question seems unclear to me...
  2. use return; instead of exit(); EDIT: You're also in the wrong section...
  3. Sure, did you understand everything? Mark SOLVED if you're satisfied (sounds weird saying that).
  4. I'll make this a separate post because I was writing it before you posted last. For the GET method Instead of this: </pre> <form action="<?php%20echo%20%24_SERVER%5B'PHP_SELF'%5D;%20?>" method="GET" name="locations" onchange="document.locations.submit();"> Select One... Location1 Location2 Location3 Location4 All Locations < do: Location1 Location2 Location3 Location4 all Change the switch statement to: switch ($_GET['locationOption']) { And because of the space you would have to do urlencode but it would be easier to change the value to: case 'all':
  5. Ooops, you don't have values for the options, you need: Select One... Location1 Location2 Location3 Location4 All Locations I would recommend to change the last option value to just "all". So change your case statement to: case 'all': or else, because of the space, you would need to use URLencode.
  6. method="GET" should be method="POST"
  7. Oh yeah 6, thanks And I never compared it to anything!
  8. $string = "http://www.google.com"; echo (substr($string, 0, 7)=="http://" ? "begins with" : "does not"; premiso beat me to it but here's mine anyway.
  9. collelctions.php: (need to link these to the images) Anniversary Trinity //etc... collections.php: $cat = $_GET['category']; SELECT * FROM table WHERE category = '$cat'; //display all your jewelry
  10. This thread should answer your question on what IDE to use. Which PHP-Editor do you think is the best? As for your other questions, there are sections devoted to each one if you look around. Use your discretion. If you post in the wrong section a mod or admin will move it appropriately.
  11. If you use the GET method than the links are going to be preset. $_GET is used for variables in the URL. You would do something like this for GET: Page with link: $search_string = "underwear"; search underwear search.php $searchstring=$_GET['searchstring']; echo $searchstring; ?>
  12. Here's a list of frameworks frameworks. Although I don't use frameworks often, the only framework I've really ever dealt with is the Zend framework, which is perfectly suitable to use working from home (I think most of them are are). It's a very popular and has nice documentation and community support. I have not had any major issues with it so far. Someone else may be able to give you a little more insight.
  13. Sorry, yeah I just skimmed over and thought you were asking something else (obviously).
  14. Should organisation_Id be (lowercase i) ? organisation_id
  15. $lastday = mktime(0, 0, 0, 4, -31, 2000); echo strftime("Last day in Feb 2000 is: %d", $lastday); ?> It's all in the manual, mktime.
  16. That's what you have (although, mentee_id equaling the username is weird...):
  17. Maq

    Help with MATH

    As in: A) 1/5 = 20% B) 20 /100 = 20% They both equal 20% but B would have a higher weight. Even if they're the same numbers you can have one section weighted higher than the next. In your case it seems that you don't want weighted percentages, your all have the same numbers.
  18. I think this is what you meant. $add = isset($_GET['next']) ? 1 : 0; $right_now = mktime(0, 0, 0, date("m")+$add, date("d"), date("y")); echo "Current date: ".date("d/m/Y", $right_now); ?> Next month Current Date You could also do it easily in JS.
  19. So which file and line are you having trouble with? Or both... And what's the exact error?
  20. This is a really vague question. There are many different ways to do this that rely on what your design already looks like. Grab all the members from the database and put them in links with the GET method. //mysql stuff ">Member: Then on your admin page just grab the $_GET['member'] field and do what you want with it.
  21. You could store the date and time in the DB. Then you could set up a cronjob to run every X amount of minutes or every hour to check to see if the date and time has passed. Of course it would be off by most, X amount of minutes or 1 hour if you decide to go with that. There may be some mailing software that can handle this to be more precise. As for links, look up "crontab" (or if you have a windows server "scheduled task") and the mail() function unless you have 3rd party software to handle that.
  22. Do $new_height and $new_width echo out valid dimensions? Here are some solutions other people found with a similar problem drupal. Check the permissions on the folder where the images are uploaded. Hope these will work, sorry I don't have a definite answer, good luck
  23. Do you mean at once, or a link that says, "click here to upload another image"? Looks like you haven't attempted either...
  24. That's impossible unless you think "project_types" is both of them... You have: SELECT p.project_types, c.cat_name which will only display "project_types" and "cat_name" but never "category_id".
  25. yeah should be (uppercase B): $brand=$_POST['Brand'];
×
×
  • 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.