Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
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...
-
use return; instead of exit(); EDIT: You're also in the wrong section...
-
[SOLVED] becoming a 'SWITCH hitter' haha jk...
Maq replied to MainStWebGuy's topic in PHP Coding Help
Sure, did you understand everything? Mark SOLVED if you're satisfied (sounds weird saying that). -
[SOLVED] becoming a 'SWITCH hitter' haha jk...
Maq replied to MainStWebGuy's topic in PHP Coding Help
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': -
[SOLVED] becoming a 'SWITCH hitter' haha jk...
Maq replied to MainStWebGuy's topic in PHP Coding Help
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. -
[SOLVED] becoming a 'SWITCH hitter' haha jk...
Maq replied to MainStWebGuy's topic in PHP Coding Help
method="GET" should be method="POST" -
Oh yeah 6, thanks And I never compared it to anything!
-
$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.
-
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
-
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.
-
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; ?>
-
Which application Framework is used the most in commercial apps? Newbie
Maq replied to DotNetTim's topic in Frameworks
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. -
Sorry, yeah I just skimmed over and thought you were asking something else (obviously).
-
Should organisation_Id be (lowercase i) ? organisation_id
-
$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.
-
That's what you have (although, mentee_id equaling the username is weird...):
-
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.
-
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.
-
So which file and line are you having trouble with? Or both... And what's the exact error?
-
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.
-
How to show a record at a specific date and time?
Maq replied to webmaster1's topic in PHP Coding Help
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. -
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
-
Do you mean at once, or a link that says, "click here to upload another image"? Looks like you haven't attempted either...
-
[SOLVED] I know it's a typo - can someone help me with this?
Maq replied to TechMistress's topic in MySQL Help
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". -
yeah should be (uppercase B): $brand=$_POST['Brand'];