Jump to content

websmoken

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Everything posted by websmoken

  1. Thanks Guys I would have got back sooner but had to go out of town. I know how to use PHP & HTML together, but always had to save as a FILENAME.PHP. I will try your solutions. I think that rajivgonsalves had what I had seen before. Again Thanks for all the input. I'll mark this as solved. Dave
  2. I've read somewhere that its possible to use PHP code on a .html or .htm page. Could someone enlighten me on that or point me in the right direction. Thanks Dave
  3. The old expression never say "NEVER"? It be happening this time. Thanks cmgmyr for the tip. Dave
  4. I recently had a hard drive crash & thank God I had just bought an external drive for back-ups. I had the system recovery partition saved to this drive. I did the recovery & found the "Hibernation" mode on. When I tried changing the setting in settings/control panel/power options/tabbed "hibernation" & unchecked the enable box. It still goes into hibernation and when I checked the settings again the box is still "unchecked". Is it another way to get this "Winblows" HP out of that mode? Thanks Dave
  5. Arthemio Let me know how this works out for you. I'm implementing the menu on my site as well. ??? Web
  6. Is it possible to check text and set a PHP variable if someone inputs links, <h1></h1> ect. and other html tags when filling out your form mail or guestbooks? Thanks in advance Web
  7. Hey Fellow Forumholics I am wanting to use PHP generated stylesheets on our commercial site. I'd like to have 1 CSS for the color stuff, bg & font type ect. Then have 1 for the size attributes. This CSS will be switched according to their resolution. I have been researching and found a Javascript switcher that will send you to a page according to their size. Then I think, altho I might be wrong, you'ed have like 9 different sections 10 or so pages for each. My Questions are - (1) Would it be possible to have the 9 or so different pages, set a PHP variable then be redirected back to a single index page and load the required stylesheet necessary for that resolution? OR (2) Am I as far OFF-BASE as the once rated "Planet" Jupiter is from Earth ??? Thanks fer your help,
  8. Marmite http://www.macridesweb.com/oltest/BUBBLE.html Check this page/pages on this site. I use their pop-ups in my site. http://www.candlesbythecreek.com/frag_colors.php No Bubbles though. :'( Websmoken
  9. Hi Guys I've been working on a new "facelift" for our site. Trying to do the "CSS Style" that I've been reading about in another topic. Right now I'm using table layout mode. Our options for products are fragrances, 45 of them now. I am using the overlibmws pop-ups for descriptions. Everytime we added one I had to do the "cut & paste" thing to move everything around to keep them in Alphabetical order. This got to be a pain. We have a php shopping cart program that uses MySQL which has a sort order that does this anyway for our dropdowns on the products page. I edited the Options program where you put the options in, creating 3 more fields fragrance description, Caption text and image src. Did this on the database as well. Right now theres 4 columns and 13 rows all div boxes. I have a column variable that counts the column your in. If your in the 1st, then the popup is on top right of curser. If your in either 2 middle columns then popup is centered top middle. If your on the last one then its to the left. The site still has the old table layout its at http://www.candlesbythecreek.com/fragcolors.php the new page is http://www.candlesbythecreek.com/frag_colors.php This page looks good in IE-6 fair in Mozilla. Still working on that though Heres the code: <?php $conn = mysql_connect("localhost", "username", "password"); if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysql_select_db("database")) { echo "Unable to select Database: " . mysql_error(); exit; } $sql = "SELECT option_Name, option_OLDescription, option_OLCaption, option_Frag_Img FROM tbl_skuoptions WHERE option_Archive = 0 ORDER BY option_Sort"; $result = mysql_query($sql); if (!$result) { echo "Could not successfully run query "; exit; } if (mysql_num_rows($result) == 0) { echo "No rows found, nothing to print so I am exiting"; exit; } $column_cnt = "0"; while ($row = mysql_fetch_assoc($result)) { if ($column_cnt == 0 ){ //This checks to see it your on the 1st column, if so put pop-up to right top of curser and increment column_cnt $column_cnt++ ;?> <div class="fragdescbox"> <div class="imgbox"><img src="<?php echo $row["option_Frag_Img"];?>" width="35" height="44"></div> <div class="descbox"><a href="javascript:void(0);" class="desclinks"onMouseOver="return overlib('<?php echo $row["option_OLDescription"];?>', CAPTION, '<?php echo $row["option_OLCaption"] ;?>',ol_width = 350, ol_hpos = RIGHT, ABOVE);"onMouseOut="nd();"><?php echo $row["option_Name"]; ?></a></div> </div> <?php }elseif ($column_cnt < 3 ){// If on 2nd or 3rd column then put pop-up to center top of curser and increment column_cnt $column_cnt++ ;?> <div class="fragdescbox"> <div class="imgbox"><img src="<?php echo $row["option_Frag_Img"];?>" width="35" height="44"></div> <div class="descbox"><a href="javascript:void(0);" class="desclinks"onMouseOver="return overlib('<?php echo $row["option_OLDescription"];?>', CAPTION, '<?php echo $row["option_OLCaption"] ;?>',ol_width = 350, ol_hpos = CENTER, ABOVE);"onMouseOut="nd();"><?php echo $row["option_Name"]; ?></a></div> </div> <?php }else{// Must be the last column so place popup to left of curser and reset column_cnt $column_cnt = "0" ;?> <div class="fragdescbox"> <div class="imgbox"><img src="<?php echo $row["option_Frag_Img"];?>" width="35" height="44"></div> <div class="descbox"><a href="javascript:void(0);" class="desclinks"onMouseOver="return overlib('<?php echo $row["option_OLDescription"];?>', CAPTION, '<?php echo $row["option_OLCaption"] ;?>',ol_width = 350, ol_hpos = LEFT, ABOVE);"onMouseOut="nd();"><?php echo $row["option_Name"]; ?></a></div> </div> <?php } } mysql_free_result($result); ?> I have no idea why the code looks like crap at least it did when I previewed. Didn't know if anybody is interested or not, just thought I'd throw this in the ring. Websmoken
  10. wildteen88 Thanks Guy, Guess 1 could say I'm a DUMBUS!! Guess I should have known. Before when I tried to open my .php extensions, nothing with the php includes would show up. Got it now, thanks to you. Dave
  11. Howdy Guys I have WAMP 1.6.1 and it works great. IE is the browser that I have when I view files tru "localhost". I'm working on some CSS layouts for my site and want to view in "Firefox" also. Is it possible to configure both in WAMP? Dave
  12. A great site for tooltips. http://www.macridesweb.com/oltest/ Dave
  13. Ken I tried the code sniplet you provided, a huge THANKS by the way for your help. I then input the number "4444444444444444", in the database was the number "5675336579130000". The output that appeared when I tried to retrieve the number was "4444444444440000". Something with the first sniplet on the input side must somehow be rounding off the 1st 4 LSB's. The hexnum was 45f7d6871e84b. The 3rd party program is for PHP version 4.3.11 & MySQL version 4.0. I'm running PHP5 & MySQL4 on localhost. Don't know it this helps or not. Thanks again, Dave
  14. Ken Without posting the 3rd party script, heres what I got. Orig_Num & HexNum is from the script. I added the other code. <?php $HexNum = "0"; $NewNum = "0"; $Orig_Num = "1234567890123456";//any 15-18 bit base 10 number (always positive) from script. $HexNum = uniqid("");// This $HexNum is from script as well (pulled from database). $MidDec = base_convert($HexNum,16,10); $NewNum = $NewNum + ($NewNum + $MidDec);//Store This number back in database. ?> I do the reverse to obtain Original Number: <?php /* $NewNum retrieved from database then $Mid_Dec is subtracted from it, giving you the original number. */ $Orig_Num = "0"; $Mid_Dec = "0"; $Mid_Dec = base_convert($HexNum,16,10);//$HexNum retrieved from database. $Orig_Num = $NewNum - $Mid_Dec; ?> Hope this helps. What I have works its just in scientific notation before it goes in database and after its retrived. Websmoken (Dave)
  15. Howdy guys, I'm trying to add the uniqid() base 16, to a large (15 - 18 bit) base 10 number, store both, later retrieving both numbers and subtracting. Is this possible to do without the results going into scientific notation? Websmoken
  16. Thanks Guys Guess I should have known. I love my DW but will rely on browsers in the future. I really like this forum can find out most anything. By the way, Anybody know Wednesday's winning Powerball numbers? :D Dave
  17. Hi Yall I'm new at all of this, like 1 yr now, so my question might sound stupid. I have my site up and running with the "archaic table design" and I've started doing some updating, after reading about CSS base designs. When viewing in DW's design view all of it is jumbled up but in IE its looks pretty good and in FF stuff looks uncentered but not as bad as DW. Should I forget the design view & just view on browsers? Dave
  18. printf Thanks Bubba that done it. I'll remember you in my will. If I ever get outta da POHouse, I'll hire an Attorney and write 1. Thanks again and Thanks PHP Freaks for this great Forum Dave
  19. I'm working on a UPS rates program for my shopping cart. I come back with an actual shipping amount like 23.55 or an error. I need to set a variable like $_SESSION["UPS_Error"] if I do. The errors I've encountered are: error (This is what I get if UPS were busy or offline) Missing ServiceLevelCode Missing ShipperPostalCode Missing ConsigneePostalCode The maximum per package weight for the selected service from the selected country is 150 pounds. <?php/*-----This script sets up every thing then calls the ups.php script below ---------------*/ require("ups.php"); $rate = new Ups; $rate->upsProduct("GND"); // See upsProduct() function for codes $rate->origin("37217", "US"); // Use ISO country codes! $rate->dest("68505", "US"); // Use ISO country codes! $rate->rate("RDP"); // See the rate() function for codes $rate->container("CP"); // See the container() function for codes $rate->weight("55"); $rate->rescom("RES"); // See the rescom() function for codes $quote = $rate->getQuote(); echo $quote; ?> <?php/* ------------------ Actual ups calling script - ups.php ---------------------*/ class Ups{ function upsProduct($prod){ /* 1DM == Next Day Air Early AM 1DA == Next Day Air 1DP == Next Day Air Saver 2DM == 2nd Day Air Early AM 2DA == 2nd Day Air 3DS == 3 Day Select GND == Ground STD == Canada Standard XPR == Worldwide Express XDM == Worldwide Express Plus XPD == Worldwide Expedited */ $this->upsProductCode = $prod; } function origin($postal, $country){ $this->originPostalCode = $postal; $this->originCountryCode = $country; } function dest($postal, $country){ $this->destPostalCode = $postal; $this->destCountryCode = $country; } function rate($foo){ switch($foo){ case "RDP": $this->rateCode = "Regular+Daily+Pickup"; break; case "OCA": $this->rateCode = "On+Call+Air"; break; case "OTP": $this->rateCode = "One+Time+Pickup"; break; case "LC": $this->rateCode = "Letter+Center"; break; case "CC": $this->rateCode = "Customer+Counter"; break; } } function container($foo){ switch($foo){ case "CP": // Customer Packaging $this->containerCode = "00"; break; case "ULE": // UPS Letter Envelope $this->containerCode = "01"; break; case "UT": // UPS Tube $this->containerCode = "03"; break; case "UEB": // UPS Express Box $this->containerCode = "21"; break; case "UW25": // UPS Worldwide 25 kilo $this->containerCode = "24"; break; case "UW10": // UPS Worldwide 10 kilo $this->containerCode = "25"; break; } } function weight($foo){ $this->packageWeight = $foo; } function rescom($foo){ switch($foo){ case "RES": // Residential Address $this->resComCode = "1"; break; case "COM": // Commercial Address $this->resComCode = "2"; break; } } function getQuote(){ $upsAction = "3"; // You want 3. Don't change unless you are sure. $url = join("&", array("http://www.ups.com/using/services/rave/qcostcgi.cgi?accept_UPS_license_agreement=yes", "10_action=$upsAction", "13_product=$this->upsProductCode", "14_origCountry=$this->originCountryCode", "15_origPostal=$this->originPostalCode", "19_destPostal=$this->destPostalCode", "22_destCountry=$this->destCountryCode", "23_weight=$this->packageWeight", "47_rateChart=$this->rateCode", "48_container=$this->containerCode", "49_residential=$this->resComCode" ) ); $fp = fopen($url, "r"); while(!feof($fp)){ $result = fgets($fp, 500); $result = explode("%", $result); $errcode = substr($result[0], -1); switch($errcode){ case 3: $returnval = $result[8]; break; case 4: $returnval = $result[8]; break; case 5: $returnval = $result[1]; break; case 6: $returnval = $result[1]; break; } } fclose($fp); if(! $returnval) { $returnval = "error"; } return $returnval; } } ?> I've tried the "gettype() " and tried "function check_int" It was probably something I did wrong but couldn't get thoses to work. Maybe one of ya'll expert coders could lead me in the right direction. Thanks, Dave [move]... _ _ _ ...[/move]
  20. wildteen You DA MAN Bubba. That works great. I've read that is was best to use the long tags. Now I won't make that mistake again. Thanks Dave
  21. wildteen88 WAMP5 1.6.1 uses PHP 5.1.2. I use the SpiceScript Contact Us Package and the include statement: "<? include ("guestmailer/guest_form.php");?>" I looked at the script & the readme, it doesn't say what PHP it was written for. Its in use on my contact us page & for my guestbook. http://candlesbythecreek.com/contactus.php & http://candlesbythecreek.com/guestbook.php . The guestbook doesn't auto post. Dave
  22. I've noticed something with WAMP5 ver 1.6.1, is when I do an include on a form mail script I found, that it doesn't show up on localhost when I try to view the page but when I upload to my server it does. I have Cartweaver & WAMP5 shows thoses includes ok. the form appears ok in Dreamweaver. Its no big deal maybe its the differences between PHP versions or something. Dave
  23. This was an original program that works. I'm just adding to it, using what he had as a guide. Don't know why he didn't use quotes. Sorry I took up your time. I'm gonna do somemore reading. Thanks for ya'lls help. Dave
×
×
  • 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.