Jump to content

azunoman

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Everything posted by azunoman

  1. Thanks very much for your reply Time Bomb. Here is what I am trying to do (better explanation I hope) I have a module for a cms, it reads the http_host name and if it's in my database I switch the hard coded cms core url with the http_host. Then let the cms proceed naturally. Thus allowing more than one domain name to run on the cms. I am currently testing using aliasing and it works fine but any forward I use either the hosting providers interface for park/park frame or .htaccess I can not compare the http_host. Nor is there anything in the referrer or forward server variables. And I agree with your advice on 301/302. I will use a 302 on the .htaccess or actual php code if I can read the original url referrer. I am hoping to offer alternative method(s) to customers that use this module to point their other domain name(s) to the cms and which my module can read and take appropriate action.
  2. p.s. I little incentive, on scouts honor. anyone solving this issue I'll send $25.00 via paypal it's not much but maybe a light dinner for two.
  3. I am running multiple tld's using domain alias from my hosting account. When my site gets control it checks the $_SERVER['HTTP_HOST'] to see if it's what's defined in my allowed tld table and if so updates the CMS core with the tld domain name and other details used by the CMS. The aliases address appears as expected in the address bar. Works great! I have been looking at other options outside of domain aliasing, because of email issues and some people may not have the capability to define a domain alias easily. -I've ruled out frame(masked) forwarding as this won't work with paypal and other payment gateways I suspect. Nor is it SEO friendly at all, etc. -For regular 'parked' unmasked forwarding I do not receive the original url 'referrer', but will test again. :DMy question is how can I use a 301 redirect and keep the tld coming into the the main domain in the address bar? I also need to check if it's a redirect and that the referrer is in my tld table, and if so execute code like I do for alias. i.e. .htaccess redirect in domainone.xx to domaintwo.xx with domainone.xx still in the address bar. here is the example I've used for 301's that I don't want the redirected site to display in the receiving domain. Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.old-domain.com$ [NC] RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L] I really appreciate review of the freaks.
  4. Great reply PFMaBiSmAd, thank you! I left out many details in my post and I apologize, I call the PLESK 9 CLI via shell_exec db --create. I went to the PLESK panel manager and entered it manually and it worked. I never really liked using the subdomain name for the db username, I will take this opportunity to use a php rand to create the db username. sorry marked as resolved...my bad...I will come back and post the sql command
  5. Hi, long time fan of the phpfreaks. I have a cron job that creates sub/domains using PHP, I received an error creating a sites mysql db username: "Unable to create database: Database user name is invalid." The MYSQL username I was trying to add was: soloparaafiliado, and is the subdomain name. Obviously I need to check my generated MYSQL username so that it doesn't get rejected. I have no requirement that the MYSQL username be the same as the subdomain. Beat around the web looking for some guideline on the allowed formats of a MYSQL username but didn't find anything obvious. Curious if there any information of valid username format. Any help would be great appreciated.
  6. Hi, what sort of site do you have now? There are loads of really good off the shelf open shopping systems. We really like the prestashop model but whatever mode (assuming you are not writing from scratch) ban easily be installed on your site via a folder or as a subdomain.
  7. When I last built a PHP application objects were not as yet available both in knowledge and platform. Having the opportunity to build a new php application I decided to use PHP Objects and am studying PHP Objects, Patterns, and Practice, Third Edition by By: Matt Zandstra. Most of my applications require lot's of forms. For a newbie PHP object person PHP Form Build class looks appealing. -I use Dreamweaver CS5, is there a way to design your forms say in Dreamweaver design view and easily use in the PHP Form Builder class? -I really like AJAX for front end user interface, wondering if PHP Form Builder Class is a nice interface to AJAX functions. Thanks in advance for your review. My general testing/production environment: PHP Version 5.3.8/apache2/mysql 5+
  8. It worked just as you explained above including the '?' value in index 0. Array ( [0] => [1] => Midi-Drive™ construction [2] => User adjustable Anti-Tips [3] => Com-For-Back™ Seating [4] => Fully programmable controller [5] => Precise quality control & 100% pre-ship inspection [6] => Adjustable wheelbase length (Not available on Scout RF4) [7] => Rigorous design testing [8] => Mirror Glaze™ thru & thru color [9] => Ergonomic design [10] => Adjustable independent suspension [11] => Ample horsepower [12] => Three-level brake system ) My question would be the '?' value for index 0?, if for example my db field only contained <li>'s and not the <ul>, I would shift off a valid <li>. To avoid the shift I tried checking the array after the explode to not print out a <li> if the value in index 0 wasr a ' ' (blank) and (also !is_null) but the echo of the <li> was executed so I get a ul with no text. if(" " != $listitems[$listitemindex]) { echo "<li>".$listitems[$listitemindex]; //display the <li> } Thanks for your time and patience. Getting this right will allow me to delete a field for each product, i.e. a shortened features field. I should have done it originally but I struggled then to.
  9. I have the following mysql db field: $row_rs_pwc['ProdFeatures'.$lang] <ul> <li>Midi-Drive™ construction <li>User adjustable Anti-Tips <li>Com-For-Back™ Seating <li>Fully programmable controller <li>Precise quality control & 100% pre-ship inspection <li>Adjustable wheelbase length (Not available on Scout RF4) <li>Rigorous design testing <li>Mirror Glaze™ thru & thru color <li>Ergonomic design <li>Adjustable independent suspension <li>Ample horsepower <li>Three-level brake system <li>Multiple seating choices </ul> I need to dig out each <li> into an array so I coded the following: $listitems = explode('<li>',$row_rs_pwc['ProdFeatures'.$lang],-1); But when I dump the array it contains the <ul> at index 0. Why would it not put the </ul> into my array but the <ul>????? print_r($listitems); Array ( [0] => <ul> [1] => Midi-Drive™ construction [2] => User adjustable Anti-Tips [3] => Com-For-Back™ Seating [4] => Fully programmable controller [5] => Precise quality control & 100% pre-ship inspection [6] => Adjustable wheelbase length (Not available on Scout RF4) [7] => Rigorous design testing [8] => Mirror Glaze™ thru & thru color [9] => Ergonomic design [10] => Adjustable independent suspension [11] => Ample horsepower [12] => Three-level brake system
  10. "I think you would be better off putting that info the DB instead of in a cookie." I agree. I currently serialize session data and file it in a DB when someone adds something to a cart, as an example. "The rest of your session data can be stored in a database with PHPSESSID as the index." I would like to do this...again I already serialize info and store in a blob for later look see. Do I store the session ID on their machine by cookie so that when they return some time in < expiry time retrieve the session_id from the cookie then retrieve and unserialize $_SESSION into itself?
  11. I use $_SESSION globals extensively. They work great until the user closes the browser. When they come back to our site their information, i.e. cart etc are long gone. I would like to generate a cookie that would be used to the session ID where I can then store $_SESSION (serialize) for subsequent retrieval. Can someone point me to an good tutorial? function or class....Thanks in advance for helping this old broke down 360 assembler programmer.
  12. I have built our site with basically now hard coded navigation buttons. I initially used siteassit to build the framework. Now that my db is finished I am rewriting the top db category with all associated products etc below them. I would like to generate my product navigation using both static (about us) as well as dynamic (products categories) that are defined in my sql tables. I can see how to write them myself but that is just another life experience that I don't have a lot of time for. Was looking for a dw extension or other package that might let me plug in db records cols into navigation buttons....so they are built dynamically. Thanks in advance for any thoughts you freaks might have on this subject. Cheers from Arizona.
  13. I am looking for some guidance as to how best manage new versions of our DB to the production server. (my laptop to our website DB). Currently I drop all the tables in my DB and then import via the upload of my current DB. I think this approach is getting a bit scary and is why I am asking. What is a good approach for managing DB uploads? ....create a new DB and switch my DB connects to point to new DB name? Any pointers to some common sense articles on mysql db management for the small guy would also be appreciated. Thanks.
  14. Personal Comment about Godaddy and Innovative Merchant Solutions an INTUIT Company We applied via godaddy for our merchant account. We have an in house shopping cart for the website as well as order and admin sites. We thought we were getting authorizenet.com but godaddy somehow explained away that the merchant (whoever that is) put us with Innovative Merchant Solutions an INTUIT Company. We had already coded up some really nice classes for authorizenet. When I looked at the API for "Innovative Merchant Solutions an INTUIT Company" I was basically shocked. Very few fields outside of cc authorization but get this..no .doc on responses...they do not recognize ANY test card numbers and actually tell you that you have to use a valid card number (unless you tell the api to approve anything you send it)...what a piece of junk.... This is the first time I have been disappointed in godaddy....and disappointed is not even close to how I feel...so anyway...lost a week....will use crape Innovative Merchant Solutions an INTUIT Company until I can secure a authorize net connection....jeeeeeezzzzzzzzzzz!
  15. what is your website..didn't see the address...
  16. $ccFNAME = $_POST['ccFNAME']; $ccLNAME = $_POST['ccLNAME']; $ccType = $_POST['ccType']; $ccNum = $_POST['ccNum']; $ccCVV = $_POST['ccCVV']; $ccExpM = $_POST['ccExpM']; $ccExpY = $_POST['ccExpY']; $ccAddr1 = $_POST['ccAddr1']; $ccAddr2 = $_POST['ccAddr2']; $ccCity = $_POST['ccCity']; $ccState = $_POST['ccState']; $ccCountry = $_POST['ccCountry']; $ccZip = $_POST['ccZip']; $ccPhone = $_POST['ccPhone']; $cc = new CCreditCard($ccFNAME,$ccLNAME, $ccType, $ccNum, $ccExpM, $ccExpY,$ccCVV,$ccAddr1,$ccAddr2,$ccCity,$ccState,$ccCountry,$ccZip,$ccPhone); Most of you will see the problem right away...keeping the arguments straight when I call a function...is getting a bit unwieldy...and doubtless other bad coding habits... should I just build an array from pots variables...and ?explode the array into the function call?...really just looking for a good code management help...
  17. I somehow want to end up with something like this: [MISC] => Array ( [0] => 57 =>['ListPrice']['IncIND']['StdIND'] etc....for each accessory ID [1] => 62 [2] => 48 [3] => 33 [4] => 45 [5] => 2 [6] => 63 [7] => 1 [8] => 46
  18. using form buttons and drop downs I collect information for a group of accessories. From this information I can then from subsequentr processing display the group and accessory descriptions prices etc...all works great.... In this same code where I retrieve the group code record and the associated groups accessory information I would like to store the original price as the price could change after a customer order. So what I would simply like to do is be able to add to say ['OXYG'][0] other information....I thought of just creating a new array as I build my display from this array but if I could just add...well maybe it's greener to recycle the current array. also I was just planing on serializing the array and filing it into a 'blob?' for later recall....thanks in advance for review and comments.... An example of my array: (data is by group with 1 or more accid's) [OXYG] => Array ( [0] => 53 ) [PELV] => Array ( [0] => 55 ) [MISC] => Array ( [0] => 57 [1] => 62 [2] => 48 [3] => 33 [4] => 45 [5] => 2 [6] => 63 [7] => 1 [8] => 46
  19. Please excuse my rather novice question but I am at a point where I need the freaks direction on how to proceed. Have a cart...the cart has a productid with a variable number of accessories selected by the customer. Each of the fields required to define an accessory are the same. There can be 1-30 accessories... Looking for a the best approach in storing the variable number or accessories without having to have a unique mysql column name?...jajajaja...I find it somehow tacky (but will do it) to hard code a max number the col names in mysql for acc0,acc1,...as each accx has it's own information which would have to have a unique name also. I am considering just storing my cart array in a text field but I am somewhat worried about (un)serilization not working properly especially as my data can be in multiple languages. Thanks in advance you freaks! Please note in cart array that each acc is associated to a group but only the accID is really needed for the file. Nor does this cart show price etc. Here is a typical cart: [cart] => Array ( [PCOLOR] => Array ( [0] => 73 ) [TIRE] => Array ( [0] => 49 ) [CHRG] => Array ( [0] => 43 ) [bATT] => Array ( [0] => 39 ) [sEAT] => Array ( [0] => 23 ) [sEAC] => Array ( [0] => 68 ) [ARMPADOPT] => Array ( [0] => 66 ) [ARMS] => Array ( [0] => 13 ) [DCTL] => Array ( [0] => 4 ) [bASK] => Array ( [0] => 67 [1] => 61 [2] => 37 [3] => 52 [4] => 9 ) [OXYG] => Array ( [0] => 47 ) [PELV] => Array ( [0] => 55 ) [MISC] => Array ( [0] => 2 [1] => 28 [2] => 57 [3] => 62 [4] => 33 [5] => 45 [6] => 63 [7] => 1 [8] => 48 [9] => 46 ) [ProdID] => 49 [CartTime] => 1223587286 [ProdQty] => 1
  20. darkwater.... in your example, would by chance PHP increment [] starting at 0 and going forth from there? I spent a lot of time setting my array starting at 0 and adding one etc myself and probably if I understood array processing better could have saved myself lots of work. hope that is still on topic.. $_SESSION['cart'][] = array('team' => $teamID, 'tournament' => $tourneyID); //etc
  21. yes...you must init for example $cartindex to something....
  22. case "Add Cart": case "Añadir al carro": Interesting...PHP will not match on Añadir al carro. If I take out the ñ it passes through the Case just fine. I saw that Case was somewhat sensitive, php.net, so I went with hidden fields.
  23. $_SESSION['cart'][]['team'] = $teamID; [] is empty obviously...I just wrote pretty much the same code but I put a [$cartindex] that starts at 0 and increments for each new cart. If you only want one cart then put 0 or 1 in a variable and code: $_SESSION['cart'][$cartindex]['team'] = $teamID; Array ( [cart] => Array ( [0] => Array( [team] => 2137 [tournament] => 24490 [gatefee] => [cost] => 575 hope that helps a little. I have a lot more code to support the cartindex and you should test the refresh for double post to your array. when my post data is created I set the time created and when I check the post data I compare incoming time with my current cart and if they are equal then I don't create a new cart just the current cart index....
  24. doh..that was not only easy...but super fast...that is why this is the place to go and to all that come here to ask ?'s...take to time to thank the best php freaks anywhere...thanks freaks! my website is in development....I have to next tackle gettext... how does one mark this as resolved...I did look but I getting old...
  25. Didn't see how it could be done in php.net. I have Switch and multiple Cases for various cart routines. But for the following Case I can add a cart as: case "Add Cart": or in Spanish case "Añadir al carro": Can one code multiple constants in a single Case? I am thinking rather than using the value of the submit button I should just pass a hidden value so I only need to check for one value. Comments on both is most appreciated.
×
×
  • 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.