JoshEir Posted December 22, 2020 Share Posted December 22, 2020 (edited) I've been working on JSON and have found a way to send variables from the PHP to the JavaScript using AJAX and no JQuery. For an ecommerce site does it make more sense to send the variables : description, title, cost, etc. to the JavaScript page, or would it make more sense to echo the html on the PHP page? The idea, right now, is a product page for editing and deleting product. Thanks, Josh Edited December 22, 2020 by JoshEir Quote Link to comment https://forums.phpfreaks.com/topic/311910-ecommerce-options-using-php-and-javascript/ Share on other sites More sharing options...
requinix Posted December 22, 2020 Share Posted December 22, 2020 Wouldn't it be easier to have the data on the page when it loads instead of having to load the page and then load even more after that? 1 Quote Link to comment https://forums.phpfreaks.com/topic/311910-ecommerce-options-using-php-and-javascript/#findComment-1583322 Share on other sites More sharing options...
JoshEir Posted December 22, 2020 Author Share Posted December 22, 2020 It would be harder to read though with all the quotes, breaking and continuing, with the database data. Quote Link to comment https://forums.phpfreaks.com/topic/311910-ecommerce-options-using-php-and-javascript/#findComment-1583338 Share on other sites More sharing options...
gw1500se Posted December 22, 2020 Share Posted December 22, 2020 If that is the case, it sounds like your database schema needs to be rethought. Quote Link to comment https://forums.phpfreaks.com/topic/311910-ecommerce-options-using-php-and-javascript/#findComment-1583340 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.