cmgmyr
Members-
Posts
1,278 -
Joined
-
Last visited
Never
Everything posted by cmgmyr
-
Have a "main" CMS site to control all of the other sites...so you only have one login to remember. Then when you are done making the 60 sites point all of them to the main database. easy enough?
-
Has anyone else gone through the "coding perfectalization" stage
cmgmyr replied to emehrkay's topic in Miscellaneous
I've made a few classes that I can just pop into sites: - MySQL - Misc functions (is user logged on, clean POST for DB, stuff like that) - Error reporting - Debug These really help alot when starting out with a new project -
hmmm...I think your issues go a little bit deeper then that. I found a lot of extra excapes in your code that could have been messing it up. Try this: <?php //IF user hasn't yet submitted information if ($_POST[part_num] == NULL || $_POST[part_name] == NULL) { $pagedisp == "<h1>Add an item to inventory</h1> <FORM METHOD=\"POST\" ACTION=\"do_addinv3.php\"> <P><em>General Information:</em></P> <P><STRONG>Part Number:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"part_num\" SIZE=14 MAXLENGTH=10></P> <P><STRONG>Product Name:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"part_name\" SIZE=50 MAXLENGTH=100></P> <P><STRONG>Set of: </STRONG> <INPUT TYPE=\"text\" NAME=\"peices\" SIZE=6 MAXLENGTH=10></P> <P><STRONG>Product Description:</STRONG> (if entered, this will be displayed on the product page)<BR> <TEXTAREA NAME=\"part_desc\" COLS=50 ROWS=5 WRAP=virtual></textarea></P> <P><STRONG>Finish:</STRONG><BR> <select name=\"finish\" id=\"finish\"> <option value=\"aged\" selected>aged</option> <option value=\"bamboo\">bamboo</option> <option value=\"blp\">BLP</option> <option value=\"cham\">cham</option> <option value=\"fountain\">fountain</option> <option value=\"glazed\">glazed</option> <option value=\"metal\">metal</option> <option value=\"rustic\">rustic</option> <option value=\"rv\">RV</option> <option value=\"sand finish\">sand finish</option> <option value=\"sandstone\">sandstone</option> <option value=\"test\">test</option> <option value=\"toadstools\">toadstools</option> </select> </P> <P><STRONG>Color:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"color\" SIZE=35 MAXLENGTH=100></P> <STRONG>NOTE:</STRONG><em> All dimensions are in inches. Please type in numbers only.</em><br><br> <fieldset><STRONG>Size 1 Name: </STRONG>(ex: large, small)<BR> <INPUT TYPE=\"text\" NAME=\"size1name\" SIZE=10 MAXLENGTH=25> <P><STRONG>Width:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"width\" SIZE=8 MAXLENGTH=8></P> <P><STRONG>Height:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"height\" SIZE=8 MAXLENGTH=8></P></fieldset> <P><fieldset><STRONG>Size 2 Name:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"size2name\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Width:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"width2\" SIZE=8 MAXLENGTH=8></P> <P><STRONG>Height:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"height2\" SIZE=8 MAXLENGTH=8></P></fieldset> <P><fieldset><STRONG>Size 3 Name:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"size3name\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Width:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"width3\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Height:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"height3\" SIZE=10 MAXLENGTH=25></P></fieldset> <P><fieldset><STRONG>Size 4 Name:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"size4name\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Width:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"width4\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Height:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"height4\" SIZE=10 MAXLENGTH=25></P></fieldset> <P><fieldset><STRONG>Size 5 Name:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"size5name\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Width:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"width5\" SIZE=10 MAXLENGTH=25></P> <P><STRONG>Height:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"height5\" SIZE=10 MAXLENGTH=25></P></fieldset> <P><em>Product Availibilty:</em></P> <P><STRONG>Current Ammount in Stock:</STRONG><BR> <INPUT TYPE=\"int\" NAME=\"in_stock\" SIZE=10 MAXLENGTH=10></P> <P><STRONG>Current Ammount on Order:</STRONG><BR> <INPUT TYPE=\"int\" NAME=\"on_order\" SIZE=10 MAXLENGTH=10></P> <P><em>Product Pricing:</em></P> <P><STRONG>Wholesale Price:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"whole_price\" SIZE=10 MAXLENGTH=10></P> <P><STRONG>Retail Price:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"ret_price\" SIZE=10 MAXLENGTH=10></P> <input type='hidden' name='submitted' value='TRUE' id='".time()."' > <input type='hidden' name='MAX_FILE_SIZE' value='".$max_file_size."' >"; for($x=0;$x<$num_of_uploads;$x++){ $form .= "<input type='file' name='file[]'><br />"; } $form .= "<br /><font color='red'>*</font>Maximum file length (minus extension) is 15 characters. Anything over that will be cut to only 15 characters. Valid file type(s):"; for($x=0;$x<count($file_types_array);$x++){ if($x<count($file_types_array)-1){ $form .= $file_types_array[$x].", "; }else{ $form .= $file_types_array[$x]."."; } } echo($form); if(isset($_POST['submitted'])){ uploaderFILES($num_of_uploads, $file_types_array, $max_file_size, $upload_dir); } $form .= " <!-- Cancel for now <P><STRONG>Picture Link:</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"pic_loc\" SIZE=75 MAXLENGTH=100></P> <P><STRONG>Extra Picture Link 1 (if applicable):</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"pic_loc2\" SIZE=75 MAXLENGTH=100></P> <P><STRONG>Extra Picture Link 2 (if applicable):</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"pic_loc3\" SIZE=75 MAXLENGTH=100></P> <P><STRONG>Extra Picture Link 3 (if applicable):</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"pic_loc4\" SIZE=75 MAXLENGTH=100></P> <P><STRONG>Extra Picture Link 4 (if applicable):</STRONG><BR> <INPUT TYPE=\"text\" NAME=\"pic_loc5\" SIZE=75 MAXLENGTH=100></P> --> <P><INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Enter Item Into Inventory\"></P> </FORM> <P><a href=\"cntrconmgrgrbw.php\">Go Back to Main Menu</a></P>"; } ?> ...another hint that will help you out, try not to output that much html in php. It would be a lot easier on you if you stop the php write the html then start the php again.
-
Check out http://www.expertsrt.com/tutorials/Matt/HTTP_headers.html and go to close to the bottom of the page, you will see a "Common MIME types" table on the right that you can use to change the file types.
-
try: if(isset($_POST['submitted'])){
-
...correct you "redirect" to a file...which prompts you to download it
-
take a look at header() you can use this to download a file.
-
[SOLVED] how to wrap text around an image??
cmgmyr replied to cluce's topic in Editor Help (PhpStorm, VS Code, etc)
You can do this with CSS <img src="image.jpg" style="float:left;"> -
haha way too funny
-
do a search for "chained selects" you will find tons
-
MySQL Query Return Category Name Instead of #
cmgmyr replied to GeekyGirl's topic in PHP Coding Help
Try something like this: $sql = "SELECT t1.ID, t2.category FROM table_1 t1 INNER JOIN table_2 t2 ON (t1.ID = t2.ID) WHERE t1.ID = $id"; -
Thanks for the link. I checked it out, but I think it's going to be way too bulky for the application. Between the javascript includes and the html that I would have to include in the link...it's a lot of code. Thanks again though! Any other ideas?
-
Hey All, When I was surfing around the other day looking for something I came across: http://www.bytemycode.com/. You can create an account and post your scripts, others comment and vote on them. I thought it was pretty cool.
-
did you try using JOIN's? ...that might help to speed it up.
-
Has anyone else gone through the "coding perfectalization" stage
cmgmyr replied to emehrkay's topic in Miscellaneous
Well first of all it's good that you want to make things perfect. I run into this issue a lot too. Here is something that could help you out...Try and keep focused on the topic on hand...meaning make it work as best you can for that specific application, just so it works like you want it and how you need it to work. Once you are totally done with that application or script re-visit it later and fix it up when you aren't "on the clock". What I usually do is if I'm working through a script and think of something that could make it better but it's something I don't need currently, I just write myself a note so that I can re-visit it later. Hope that helps! -
I want to have a script that when you rollover an image it loads a page into a "pop-up". Kind of what Netflix does here: http://www.netflix.com/BrowseSelection?lnkctr=nmhbs. But I want to be able to move the mouse onto this pop up so that the user can click on elements in it (this will also have ajax elements in it). I uploaded an example of what I'm looking for (I just made it in photoshop). Does anyone know a tutorial that I can use, or an example? I've been looking for a while but I haven't found something that does what I want it to. Thanks! [attachment deleted by admin]
-
Check this out: http://www.webmasterworld.com/forum13/687.htm
-
or... http://www.google.com/search?source=ig&hl=en&q=php+email+class
-
Hey All, I was surfing around the internet when I stumbled across something that some of you might find useful. Check out: http://freelanceswitch.com/rates/ All you have to to is enter in your business/personal expenses and hours you work and it pops out what you need to be making per hour. I though this was pretty neat and I figured that this would help some of you out there that are starting out with freelancing and getting a good hourly rate. This site also has a lot of great articles that are pretty useful.
-
Yeah, I like it too, and it makes me lots-o-money
-
We had this when we first started with SMF, but it went away shortly there after...it got a little out of control.
-
[SOLVED] Mod Rewrite based on a MySQL result?
cmgmyr replied to suttercain's topic in Apache HTTP Server
Hey, Check this out http://www.phpfreaks.com/forums/index.php/topic,107190.0.html (Third post - mine) Hope that puts you in the right direction. -
You can also do: <a href="delete.php?id=<?php echo $id ?>" onclick="return confirm('Are you sure you want to delete this?')">DELETE</a>
-
The easiest way to do this is with a JS pop up, you might be able to do it with a DHTML window...but i'm not sure
-
Check this out...you can also download the complete source to mess with it. http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-271_290_312.html