-
How to use javascript inside PHP?
You still should be validating data especially when using a database. Look into mysqli_real_escape_string(); and seriously look into mysqli* instead of mysql*. Cheers
-
Multiple currencies in an shop
Glad to be of assistance, good luck! Cheers.
-
How to use javascript inside PHP?
Hi, I never said it would work, I'm not writing it for you! It's just for ideas as what you had was wrong also. If you want it fully diagnosed perhaps post your full code rather than just snippets. Cheers
-
How to use javascript inside PHP?
What do you expect to happen at if($result) ? To be literal, if result...... what? I think your trying to check if the query is a success, in which case try this instead: <?php $qry = "insert into contactus(name,email,subject,message) values('$name','$email','$subject','$message')"; $result=mysql_query($qry); // Query has failed, display message if(!$result) { ?> <script type="text/javascript"> <!-- alert('Message failed'); //--> </script> <?php // Redirect to page header('Location: contactus.php'); } else { ?> <script type="text/javascript"> <!-- alert('Message sent'); //--> </script> <?php // Query has succeeded, redirect header('Location: contactus.php'); } ?> You should also in this day and age be validating input, i.e. protecting against SQL Injection and also using mysqli* instead of mysql*. That script/your database could be compromised in seconds. Also check your original alert message for a failure and think about why that wouldn't work. I have not tested the above and it may not work, but mixing PHP (server-side) and JS (client side) is usually messy in this way. You're probably going to run into header errors as well I might add, I could solve them for you but where would be the fun in that
-
Multiple currencies in an shop
In which case you may find getshopped will suffice. It's just one of those things experience has taught me to be mindful of. I always try and build in a level of scaleability in a project, to be perfectly honest not for the customers benefit, but for mine. Too many times a client will come back to me a year later and want to change tact, depending on how limiting your initial decision was could end up with you losing a client or losing money because you're having to "correct" your initial "mistake", for lack of better words. WordPress is a fantastic CMS, for all levels of users, however all too often it's used as the start point for every project known to man. I have used it and will use it again, and personally love it so this isn't a WordPress bashing post, just try and make sure that you use the right base to build from, it's only going to make your life easier. Most of the time clients don't understand nor care about how hard or easy it is to add functionality to a site, they just want it! To summarise, it's not about whether getshopped is good or bad, just right or wrong. It's important to remember what it is, which is a secondary plugin to a CMS, not an e-commerce platform, therefore it's always going to be limited compared to standalone e-commerce platforms. I know several developers who use Magento (one of the best e-commerce platforms around - incredibly feature packed as a shopping cart) as a CMS, just because it's available. They then spend hours removing all traces of carts, compare, wishlists, checkouts and other e-commerce references from the program! I wish you all the best, if you get any problems let us know. Hope this helps?
-
Domain name is available but not with my host
Hmm, interesting. What is the domain name? Cheers.
-
A landing page without having the index.html ext. showing
He already has a 301 redirect in place which is causing his issue. If, as assumed, his issue is that he just wants the root URL to display upon page load, i.e. http://www.yourdomain.com instead of http://www.yourdomain.com/index.html he won't need any redirects in his .htaccess as this is normal behaviour. You're also assuming his hosting/server has mod_rewrite enabled, which some don't, in which case your above code won't work. It's also good practise to initialise the RewriteEngine before writing rules, again assuming mod_rewrite is enabled. Hope this helps, let us know how you get on!
-
Sending Emails to all members
Again, as said above, that's not really a question that can be answered without knowing the amount of e-mails your sending. If you have 5 users and it won't increase then fine, but if it's a newsletter with 2000 subscribers you're going to need to batch the sending. A cron job would work, or use the sleep function within PHP and a while loop to achieve a similar thing to prevent it throttling the server. Cheers
-
Forms that return answers depending on input
Hi, If you're going to be forwarding users to different areas, the combination of an if statement and a header redirect would work, like: if($number >= "5"){ header('Location: http://www.yourdomain.com/page1'); } Just an example obviously but a combination of these techniques will achieve what you wish. Remember, if using the header statement you must not render any HTML before this in your php "processor" file, resultspage.php. Furthermore, if you're having a lot of redirects or potential "if" statements, consider using the switch function instead. See these links for more info: http://php.net/manual/en/function.header.php http://php.net/manual/en/control-structures.if.php http://php.net/manual/en/control-structures.switch.php Cheers
-
Multiple currencies in an shop
Hi, When you put it like this, perhaps WordPress is the better platform for what you're doing, in this instance. I've had experience with getshopped and it was more a case of being underwhelmed than negative, but then I do come from a Magento/Lemonstand background so it's not really a fair comparison. My problem with this sort of thing is experience with clients in the past and their inevitable want to scale up in the future. In a years time you don't want to be re-doing the whole site because the client has "come up with an idea" and your original choice of platform was not scaleable, who do you blame? If, and it's a big if, you're only going to be selling what is basically 1 product then I'm sure a variant of e-commerce plugin would be just fine, however you do require multi-currency with automated conversion rates, which is not what these simple e-commerce plugins are designed to do. Perhaps the best thing would be looking at an additional plugin for the free e-commerce plugins to deal with the currency or perhaps even paying for one of the WordPress e-commerce plugins if they contain such a feature. I'm afraid I can't give you much more information about the e-commerce plugins other than the link I provided. From a design and feature point of view Shopp "looks" reasonable but it may be worth asking the question to a couple of them see if they can handle your requirement. Else it's probably going to be a custom job or some clever negotiating with the customer! Hope this helps.
-
Multiple currencies in an shop
With respect though, getshopped is not really built as a multi-lingual, multi-currency e-commerce platform. I've used it on a few occasions and have not been impressed, it's great for small stores just selling a few items I guess and I'll probably get someone chime in saying they take £10 million a year shortly but I stand by my opinion. I really think you should look into a better package as there's an abundance of them out there. If you insist on using WordPress for an e-commerce platform then take a look here for some WordPress e-commerce plugins. I think personally you're better off starting with software designed for what you want to do such as OsCommerce or OpenCart. I don't really recommend Magento as this is really a different ball game. I have 43 Magento sites on one of my node servers and they have the potential to be a mare if not installed, setup and maintained correctly, and that's before you even go down the hardware route! Cheers
-
A landing page without having the index.html ext. showing
Hi, No worries at all. As I say it depends how this 301 has been put in place, whether it's in a .htaccess or via an option in your control panel so have a look around. If you get stuck just reply here and I'll help if I can. Cheers.
-
First time to rigester domine name help.
Hi, It's a few days since your post but bigrock.in is already taken, unless it's you that's purchased it? AwardSpace's Free package is also a little contradictory as it says that you get Full DNS control but are not allowed custom A, CNAME or MX records. Assuming you registered bigrock.in with AwardSpace it should be fine, but remember it's a free account so will have limitations. Cheers
-
Heart Internet VPS Mail Servers
I've never used a Heart Internet VPS server but have several of my own unmanaged dedicated servers so hopefully I can help. Both of those domains have mail. prefixes setup for MX records, so I assume these are the domains you are using to connect with your mail client. What server software does the VPS come with, is it Plesk, cPanel etc or just a command line? Also have you actually registered the martin-greenwood.co.uk nameservers as proper nameservers for the server? If you haven't associated those nameservers correctly your DNS won't be functioning correctly. The good news is both mail.martin-greenwood.co.uk and mail.naturalgleam.co.uk resolve and are functioning on the correct IMAP port (143). Cheers
-
-
html coding for website
Assuming it's not a CMS system that's using GET's etc for database data yes, an <a href=""></a> as above would be fine. Remember alt="" in your image tag as well.