Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter niamh2

    (@niamh2)

    Thanks Esmi. I gave up and started afresh with a new sub domain.

    Thread Starter niamh2

    (@niamh2)

    Yes I agree. Where do I find the password for the DB in phpmyadmin?

    Thank you a 1,000 times for your help, time, patience and perseverance yesterday. I was able to write out the instructions for my friend so she can create more sites easily.

    Hi Govpatel

    You make it sound so easy. I have spent all day on this and I need your help too.

    I created the DB. How do I assign the privileges?

    I did amend the config file to include database name
    database user
    password
    Db_host

    How do you run the install program? I type in the domain/wp-admin/install.php but nothing happens except a broken links message.

    Could you please tell me what I am doing wrong.

    Many thanks in advance.

    Regards

    Thread Starter niamh2

    (@niamh2)

    Thank you Peter.
    Ok I am still lost. I have this code successfully working in a page:

    <html>
    <head><title>Bob’s Auto Parts</title></head>
    <body>
    <form action=”processorder.php” method=”post”>
    <table border=”0″>
    <tr bgcolor=”#cccccc”>
    <td width=”150″>Item</td>
    <td width=”15″>Quantity</td>
    </tr>
    <tr>
    <td>Tyres</td>
    <td align=”center”><input type=”text” name=”tireqty” size=”3″ />
    </td>
    </tr>
    <tr>
    <td>Oil</td>
    <td align=”center”><input type=”text” name=”oilqty” size=”3″ />
    </td>
    </tr>
    <tr>
    <td>Spark Plugs</td>
    <td align=”center”><input type=”text” name=”sparkqty” size=”3″/>
    </td>
    </tr>
    <tr>
    <td>How did you find Bob’s?</td>
    <td><select name=”find”>
    <option value = “a”>I’m a regular customer</option>
    <option value = “b”>TV advertising</option>
    <option value = “c”>Phone directory</option>
    <option value = “d”>Word of mouth</option>
    </select>
    </td>
    </tr>
    <tr>
    <td colspan=”2″ align=”center”><input type=”submit” value=”Submit Order” /></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    I need to know about the next piece of code, which is the “processorder.php”,as to where I put it. Do I put it somewhere with the file manager or do I put it as part of the theme similar to the php for sidebars? You are suggesting that I put the two together which I tried without success.

    <html>
    <head>
    <title>Bob’s Auto Parts – Order Results</title>
    </head>
    <body>
    <h1>Bob’s Auto Parts</h1>
    <h2>Order Results</h2>
    <?php
    echo ‘<p>Order processed at ‘;
    echo date(‘H:i, jS F’);
    echo ‘</p>’;
    echo ‘<p>Your order is as follows: </p>’;
    echo $tireqty.’ tires
    ‘;
    echo $oilqty.’ bottles of oil
    ‘;
    echo $sparkqty.’ spark plugs
    ‘;

    $totalqty = 0;
    $totalamount = 0.00;

    $totalqty = 0;
    $totalqty = $tireqty + $oilqty + $sparkqty;
    echo ‘Items ordered: ‘.$totalqty.’
    ‘;

    $totalamount = 0.00;

    define(‘TIREPRICE’, 100);
    define(‘OILPRICE’, 10);
    define(‘SPARKPRICE’, 4);

    $totalamount = $tireqty * TIREPRICE
    + $oilqty * OILPRICE
    + $sparkqty * SPARKPRICE;

    echo ‘Subtotal: $’.number_format($totalamount,2).’
    ‘;

    $taxrate = 0.10; // local sales tax is 10%
    $totalamount = $totalamount * (1 + $taxrate);
    echo ‘Total including tax: $’.number_format($totalamount,2).’
    ‘;

    ?>
    </body>
    </html>

    If I could get this going then I could work through my book on PHP, MuySQL using WP without having to set up some complicated testbed.

    Thank you in advance for your help.

    Thread Starter niamh2

    (@niamh2)

    Hi,

    Thank you for replying.
    I’ve been through that several times but it leaves me no further forward. I can write the code or copy it but what I don’t understand is that if I create an order form and have the code to process the order where do I put that file so the two work together. Can I put the order form as part of the theme?

    Regards,

    It looks good for a simple wordpress theme. Could you do something more advance such as adding an order form to the theme and more advanced still how to get the orders in a mysql database?

    Thread Starter niamh2

    (@niamh2)

    I have reinstalled it at least twice last night and could not get into admin at all. This morning I got up, did a reinstall using Firefox browser instead of Safari and everything worked fine.

    Thread Starter niamh2

    (@niamh2)

    Thank you for your help. It was an extra line in the wp-config.php file.

    Regards,

    Niamh

    Thread Starter niamh2

    (@niamh2)

    Thank you but under what in particular?

Viewing 11 replies - 1 through 11 (of 11 total)