AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
Checkbox value(s) into array then into $_SESSION
AyKay47 replied to Hyperjase's topic in PHP Coding Help
if you are going that route, if(!empty($_POST['topping'])){ $_SESSION['topping'] = $_POST['topping']; $last = array_pop($_SESSION['topping']); $topping = implode(', ', $_SESSION['topping']) . ' & ' $last; echo $topping; } -
Checkbox value(s) into array then into $_SESSION
AyKay47 replied to Hyperjase's topic in PHP Coding Help
what exactly are you having trouble with? it should look something like this, foreach($_POST['tag_name'] as $key => $option) { //add filtering etc here $_SESSION[$key] = $option; } of course, you will probably want to name your sessions something other than the key, but you get the idea. do you want the options to output on the screen asynchronously or not? -
then you know that it is not an SMTP server error, but a user error. the first step in debugging this will be to look at the line referenced in the error message for any errors.
-
what I would do is check for the form submission and then proceed to disable the submit button. I also recommend jquery for this. A simple solution could be, document.getElementById("form_id").onSubmit = function() { document.getElementById("submit_id").disabled; }; of course there is room to expand upon this, but this will do the trick.
-
why not use an OR statement here instead of two queries? judging from your tables, table one will be your left table, so you might have something like this. select table_1.id, table_1.product_name, table_2.attribute_code, table_2.value left join table_2 on (table_1.id = table_2.product_id and (table_2.attribute_code = 'price' or table2.attribute_code = 'brand')) your where clause would contain any filters that you want to place on the table_1 results.
-
something has changed in your code then, before I glance at your code I must ask, have you looked at the line of code that the error is referring to? have you tried using simple syntax to send mail to make sure that it is not an SMTP error? mail('[email protected]','subject','message');
-
95% of your mime types listed are not valid mime types, perhaps this and this will help
-
you will want to the compare the mime of the file to the $_FILES[filename][type] value. I like to store the valid extensions in an array and compare the array of values to the mime type of the given file using a conditional statement.
-
Do not show emailed results if checkbox is empty .. ??
AyKay47 replied to spacepoet's topic in PHP Coding Help
mail is transferred with a mime of text/plain so any code that you have included inside of your mail() function will be parsed as text instead of php. you could either change the transfer mime type, which I really don't recommend, or you can write the php outside of your mail() function and include the variable solely -
have you tried searching for this using a search engine? there are quite a few ajax upload scripts out there.
-
two big issues here; 1. saving a users password with a cookie is a big security hazard since the cookie is frontend and therefore is available to users. I would suggest using a database to store user information and sensitive data. 2. as you have already stated, using someones ip to check authentication is not a good idea, people can easily change their ip address and sometimes do frequently which is a con that you cannot overlook. why not simply have a login page where the user is required to type in there credentials, which are then compared to the data stored in the database, which grants them access to every page?
-
the only way that we can really help you in this situation is if we see the left join attempt along with some of the relevant code.
-
this is most likely do to the DOM injection of "myinnerpage.php" using jquery after run time. I'm am not 100% sure on this, since I cannot find any documentation on the matter. However the behavior of JavaScript injected documents is much different than the behavior of pages that were say included into the page using PHP. Also, what is the purpose of using noConflict() here? Just out of curiosity.
-
can you show a little of your html, it would help to see the DOM in this situation to see the parent/child relationships.
-
in order to completely erase the session, you will need to use a combination of session_destroy() and unset() on the session variables that you want to remove. this should help you.
-
change your css to this, you will use float on your sidebar, and will add an overflow property to .main, in combination with the width property, the overflow property acts as a sort of clear fix for the float child element. .main { width:950px; overflow: hidden; // can also be auto, hidden is recommended margin-right:auto; padding-top:120px; margin-left:230px; } .sidebar { background-color:#F2F2F2; min-height:100%; width:220px; float: left; //absolute positioning should be avoided here border-right:1px solid #D4D4D4; }
-
Need feedback on design and color selection
AyKay47 replied to sandeep529's topic in Beta Test Your Stuff!
overall, i like the idea. Just make it more user-friendly -
are you using the float property on your sidebar? please post the relevant CSS
-
post the relevant code.
-
that's a pretty vague question, and really depends on what you know now.
-
the min-height is working appropriately, the div looks like that because you have specified it to be position absolute, taking it out of the dom flow, and giving it that scrunched look
-
Thank you, but could you be a bit more specific on the "random text isn't sitting at the bottom of the page until I scroll up." I'm a bit confused on that statement. certainly, when I open the webpage, I see the bulk of the info, which looks nice, then at the bottom a see a little bit of the "Contact me" and Twitter text, doesn't look right.
-
thanks, still have some shopping to do yet.