This topic is locked

Problem with <form method="post"> within data field

2/8/2010 2:34:17 AM
PHPRunner General questions
T
Tasmaniac author

Hi there, I'm having an unusual problem with my phprunner project that I was wondering if I could get some help with please!
I have a list page that lists auction items like this:


from the visual editor that looks like this:


the "Bidlink" field is set to view as HTML and edit as TEXT AREA and the actual field in the database contains this:
<html>

<head></head>

<body>

<form method="post" action="bid.php">

<label for="bid">Your Bid:</label>

<input type="text" id="bid" name="bid" />

<input type="submit" value="Place Bid" name="submit" />

</form>

</body>

</html>
My problem is, when you mouseover the PLACE BID button, it shows auctions_list.php in the bottom left of the browser window as if it's linking to that page instead of bid.php like it's supposed to. When you enter a bid amount and click PLACE BID it just reloads the auctions_list.php page and doesn't actually post the data to the bid.php page for processing. I've fiddled around and can't for the life of me get it to post properly.
Am I doing something wrong? Please help!
Thanks in advance!
-Tasman

T
Tasmaniac author 2/8/2010

To add to this, it seems like any <FORM> tag used in the HTML view just links to the current page rather than the one specified. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=47551&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />

Sergey Kornilov admin 2/8/2010

PHPRunner adds form tag automatically. I would suggest to remove form tag and process the input in BeforeListProcess event.

if ($_POST["bid"]<>"")

{

...

}


You can either process the bid right in this event or save bid value in session variable and redirect user to bid.php file.