-
Posts
1,469 -
Joined
-
Last visited
-
Days Won
12
Everything posted by CroNiX
-
How do I import all images beginning with the same characters?
CroNiX replied to NoyHadar's topic in PHP Coding Help
It would help if you showed the query you use to retrieve the image filenames. -
Form form field content dropped with larger file uploads
CroNiX replied to callerpatty's topic in PHP Coding Help
Be sure to reboot Apache after you make changes. -
Form form field content dropped with larger file uploads
CroNiX replied to callerpatty's topic in PHP Coding Help
It also appears you have "8M" entered 2x for that setting. Should be just once. -
Form form field content dropped with larger file uploads
CroNiX replied to callerpatty's topic in PHP Coding Help
In php.ini, see where it says "max_upload_size = 8M"? There are other settings you might need to tweak as well, such as: max_input_time (might need to be larger as it takes longer to upload the file depending on users connection/upload speed) max_execution_time (same as above) upload_max_filesize post_max_size -
It's not enough to just make the LINKS lowercase and with dashes. That's easy peasy to do when building the links/anchors. $link = "A New Product"; $link = strtolower(str_replace(' ', '-', $link)); echo $link; // a-new-product Your app has to RESPOND to those lowercased/dashed urls as well, which you haven't told us or shown us how you are doing that. Right now they respond to the upper cased links with spaces in it because you have it coded that way somewhere.
-
What does $status look like after you do this: $status = array_map('strval', $var['receiver']) + array(0); I'm not sure what that array(0) is supposed to do. Shouldn't those be square brackets and why are you adding that anyway? Besides that, it doesn't look like your database is normalized for your statuses. It seems those should be IDs instead of their names.
-
Yeah, the style definitions go in the stylesheet. The code he is showing you is how to apply the correct style class to your calendar's day elements depending on the conditions if there are slots available, or not.
-
Although you do run the risk of ticking them off. Personally I'd use placeholder data to demo a product to a specific company that you haven't been contracted by. It doesn't need their actual prices, etc., to show them what it would look like with their data.
-
So...what trouble is it giving you? What's the problem?
-
To redirect with javascript, it's "window.location = the_url", not "location" by itself. However, it looks like you really should be using php to redirect...on the page that receives the form data (once it's saved in the db)
- 4 replies
-
- javascript
- html
-
(and 1 more)
Tagged with:
-
Having a form insert the data in the database.
CroNiX replied to laflair13's topic in PHP Coding Help
Sorry, I see you are posting with ajax. I'd suggest trying to get it to work without the ajax and then try adding it in. It would be helpful if you did a print_r($_POST) at the top of your page receiving the form data to see if everything was POSTed correctly. It might also be useful to use jQuery's built in method for building the form data to submit instead of building your own. data: $('#contact').serialize() -
Having a form insert the data in the database.
CroNiX replied to laflair13's topic in PHP Coding Help
Where are you submitting your form to? It should be the php file that you posted above. According to your form's action attribute, you are submitting the form data to "#". <form id="contact" name="contact" action="#" method="post" style="width:600px"> -
Try this just before your query: //set a default value for the subcategory. This will be used if no subcategory exists in the URL $subcategory = 'Computing'; //Check if the subcategory exists in $_GET, and it contains a value. If it does, use that value for the subcategory. if (isset($_GET['subcategory'] && trim($_GET['subcategory']) != '') { $subcategory = trim($_GET['subcategory']); } //Perform the query using the subcategory. Either the default, or the one passed via the URL. $sql = "SELECT * FROM categories WHERE Category = '$subcategory' ORDER BY subcategory ASC";
-
Having a form insert the data in the database.
CroNiX replied to laflair13's topic in PHP Coding Help
Another thing, you are assuming everything will work by the way you've written your code. You need to test things with code, like how do you know if your db connection actually connected successfully? How do you know that your queries aren't failing since you don't test for that? You just make a query and move along. Just about everything in mysqli has a method to test to see if it was successful or not before continuing on. http://php.net/manual/en/mysqli.quickstart.connections.php Check here to see how they test to see if the connection was successful and showing the errors if it wasn't. Same with performing a query: http://php.net/manual/en/mysqli.query.php -
Having a form insert the data in the database.
CroNiX replied to laflair13's topic in PHP Coding Help
This stuff should be obvious with error reporting, your IDE, etc, but you're missing a quote where you're connecting at the very top of your script -
Most chat applications that I've seen don't sent HTML back. They send JSON (which is a lot more compact), and then the javascript builds the HTML based on the values from the JSON data and inserts it into the DOM. The timestamp can easily be a field in the JSON data.
-
Personally I'd do it with javascript. Each request for the new posts should include a timestamp of when that batch was received. Then when the data comes back just highlight everything > previous timestamp.
-
It would probably be much better for the user to be able to see the times available directly on the calendar within each day rather than having to hover over each day to see it. They just want to know what's available so they can book and appointment, right? It would also be a lot more user friendly to just have a form that pops up when clicking on a day (actually clicking on the available timeslot they want to book for) to create an appointment. The same popup can be used for all days, and you can grab the year/month/day/time they selected from the calendar depending on what they clicked on.
-
Surrounding the date with # is how you insert a date in MS Access. Not sure if it needs to be quoted or not though.
-
Keeping my header and footer on all webpages using PHP?
CroNiX replied to Coplestone's topic in PHP Coding Help
Ah, yeah that helps glad you got it resolved! -
achievement_types (lists all of the various achievement types) -id -name achievements (stores each users achievements) -id -user_id -achievement_type_id
-
Is there a good reason why you need to store these variables in my.cnf and apache.conf, instead of in your app?
-
$().hide(); and .show() is different files - How?
CroNiX replied to bambinou1980's topic in Javascript Help
I'd just use ajax to retrieve the content. You could start with your first tab populated, and show the tab. The other tabs would be empty. When clicking on the other tabs, check to see if they're empty, and if so retrieve content via ajax. If not just display the tab normally. If user clicks on same tab again, it will already have the content and not fire the ajax request a 2nd time if (this_tab_content.html() == '') //nothing in tab yet { //fire ajax to retrieve content for this tab //success: function(response) { // this_tab_content.html(response.tab_html); //on ajax success, replace content of tab with resulting html //} } -
In the docs, there is a 'hide' method to collapse. You could probably just target the anchor tags within your collapsible with an onclick event to trigger the 'hide' method.
-
You can ping the IP and see if you get a response. Sounds like you are doing something you know isn't ok if you need to vary the IP addresses you are scraping from to try to mask yourself.