Jump to content

lindstrom1989

Members
  • Posts

    11
  • Joined

  • Last visited

lindstrom1989's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Also if the third party website has any bot traps which it probably will any method of automatically populating their form would be hopeless. Cant think of any thing else sorry.
  2. Not something I have done before but I would say in the html file where your form is located you would but something like <form action="submitted_info.php" method="POST"> perhaps its possible to put two actions inside the quotes separated by a comma but then you would also need to find out what their "submitted_info.php" if looking for within a form, you can do this by viewing the source code and looking at what the id is on each field. Or perhaps store the results in a database then write some php that will loop through and pick out the persons details and submit them to the 3rd party then add a value for everyone that has been submitted to them so it won't submit it again? Or depending on how well you know the 3rd party you could just update their database from your form? These are all just theories though
  3. I could really do with some help with this, I have managed to make a shop application which works in wordpress and dynamically creates pages for me but the permalinks are the same regardless of item and I don't think its going to be good for seo. Basically I have 3 types of page, the category selection page which uses the GET method to send the item category number to the item category page which displays all items within that category number by looping until the loop number = the amount of rows for that category which nicely displays a list of items. Then when you click an item it sends the item number through the url then on the item page using the GET method I display all of the information about that item. All of the item info is stored on my mysql database and works really well but in reality I only have 3 pages and not 100+ pages equal to the amount of items because its dynamically generated. I can't change the page title or permalinks. Also if I try and access any of these pages outside of its parent page it won't generate the page because theres no information in the url telling it what to fetch. Any advice welcome.
  4. Hi, I wanted to create a dynamically generated shop using php and mysql inside an existing wordpress site. I have an idea but would like your input as to whether my theory would work or if there would be an easier method I am overlooking. I know there are a few plugins out there and I've chosen "wp shopping cart" but this just creates a shortcode which you can add some information into like price and name which then process's in to paypal. My idea is to create a database containing lots of data like item number, name, price, shipping, thumbnail and image. then dynamically create my shop layout around it based on three different types of page. The main page which lists various categories of item which I will probably use static code for as there are only a few. The category pages that will contain a grid of items within that category with a thumbnail and its name. And finally the item page containing all the item specific data including the button by the "wp shopping cart" plugin. My questions are, to create the category page could I create a loop where I could have an "item div" created with the item info inside until theres are no more items left in that category in the database? so if the where 10 items in the category and I used css to make it each item div 25% width I would have 2 1/2 rows? for example if 1 exists look for 2 if 2 exists look for 3 etc until it can't find anymore and breaks the loop? The main point for this is that its dynamically generated so all I would need to do is update the database and it will show on the website but being wordpress how would I integrate this? how would I make it seo friendly? I've looked in to taxonomy but not sure if thats the right way to go. I know I can create templates that repeat the main code and just insert database values depending on the item but how would I define the item? should I do it by passing php through the url depending on what they click on? I appreciate this is a lot to take in but would be really grateful for some answers and tips, or even a link to a similar example as the ones I have found are close but not quite what I'm trying to do
  5. Fantastic! thank you VERY much! The only thing I would like to try and do with this is to eventually turn this in to a plugin so that people can use shortcodes to add this form anywhere they like on their own wordpress sites, if anybody has any words of wisdom or good links to read up on i would be grateful.
  6. Thanks for your help I have figured it out, I wasn't doing anything wrong in the end. I tried two plugins to allow me add php scripts into wordpress pages. I Just tried a 3rd one and it works... if anybody else has the same problem try exec-php plugin to allow php tags in pages and posts. This has however bought along a newer problem although i assume it's a little simpler... the form is at the bottom of the page and when submitted it refreshes to the top of the page, is there a way to create some kind of anchor for it on the page to push down to on the refresh but only once the form has been submitted?
  7. Yeah that does the same thing. The problem is it's refreshing my page and form rather than submitting data and running the script in the page. The form works fine in my local server mamp but I get this problem when trying to add to wordpress :s
  8. I've done some digging around and replaced PHP_SELF with REQUEST_URI which reloaded the same page the form is in instead of running the script...
  9. Oh sorry I see what you mean, I tried that and now it redirects to the website index.php instead of refreshing the current page. I'd doe the same with the code in the index.php It's supposed to just run the script when submit is hit not load pages :s Could this be because of the way wordpress generates it's pages?
  10. Are you asking me a question or telling me the code needs a question mark at the end? :s
  11. Hi, I have built a custom php program for a client which takes information submitted in a html form and calculates a persons bmi. I have tested and it works fine, this is in one page (one file). My problem is I have tried to insert it in to wordpress using both shortcodes and php tag plugins (you can't insert php in to posts and pages as standard on wordpress) and I can't get it to work. The closest I've got is using a php tag plugin that uses shortcodes to replace <?php & ?> but when I submit, it just reloads the page and form rather than showing the result. as I've said it works fine outside of wordpress. <h1>BMI Calculator</h1> <!--bmi form--> <?php if (!isset($_POST['submit'])){ ?> <form action="<?php echo $_SERVER['PHP_SHELF']; ?> "method="post"> <input name="weight" size="3"> Enter your weight in kilograms (KG). </br> </br> <input name="height" size="3"> Enter your height in metres, for example if you're 160cm tall you would type in "1.60". </br> </br> <input type="submit" name="submit" value="Calculate"> </form> <?php } else { $weight = $_POST ['weight']; $height = $_POST ['height']; $bmi_catagory = array("Underweight", "Normal", "Overweight", "Obese"); $bmi = ($weight/$height)/$height; if ($bmi <= 18.5) { echo '<h2>Your bmi is '.round($bmi).'</h2><p>You are '.$bmi_catagory[0] .' Click <a href=\'../bmichecker.php\'>HERE</a> to see how Hypnoslimtize can help you achieve a healthy weight.</p>'; } elseif (($bmi > 18.5) && ($bmi <=24.9)) { echo '<h2>Your bmi is '.round($bmi).'</h2><p>You are '.$bmi_catagory[1] .' Click <a href=\'../bmichecker.php\'>HERE</a> to see how Hypnoslimtize can help you stay healthy and avoid temptations.</p>'; } elseif (($bmi >= 25) && ($bmi <=29.9)) { echo '<h2>Your bmi is '.round($bmi).'</h2><p> You are '.$bmi_catagory[2] .' Click <a href=\'../bmichecker.php\'>HERE<a/> to see how Hypnoslimtize can Help you achieve a healthy body weight.</p>'; } elseif ($bmi >= 30) { echo '<h2>Your bmi is '.round($bmi).'</h2><p> You are '.$bmi_catagory[3] .' Click <a href=\'../bmichecker.php\'>HERE</a> to see how Hypnoslimtize can help you achieve a healthy body weight.</p>'; } else { echo 'Your bmi is '.round($bmi); } } ?> <!--bmi form end-->
×
×
  • 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.