Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I speed read your question (it needs some <em>major</em> editing) and the thing which jumped out at me was...</p> <blockquote> <p>I'm doing all this on one PHP page called offers.php. To put it simply there will be 4 pages made out of offers.php. When a user initially views the offer section (offers.php) they'll see all the offers, then they can click on an offer (offers.php?id=X) then click to make a bid (offers.php?id=X&amp;action=makebid) and then confirm bid (offers.php?id=X&amp;action=confirm).</p> </blockquote> <p>I would say having this much functionality in one script is a <em>major</em> code smell.</p> <p>Why not instead have 4 PHP scripts?</p> <ul> <li><code>offers.php</code></li> <li><code>an-offer.php</code></li> <li><code>bid.php</code></li> <li><code>confirm.php</code></li> </ul> <h2>Addendum</h2> <p>Like @Thomas Clayton says, You need to use some <code>POST</code> requests here. You're modifying server state with <code>GET</code> requests which is textbook <em>BAD</em> in so many ways it makes me wish you were <a href="https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">parsing HTML with RegEx instead</a>. (which would also be bad)</p> <p>Read on <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Safe_methods" rel="nofollow noreferrer">Wikipedia</a> and on the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html" rel="nofollow noreferrer">w3c web site</a> about how GET is a safe method.</p> <p>Read about web sites that got buggered up because of changing state on <code>GET</code> requests:</p> <ul> <li><a href="http://thedailywtf.com/Articles/WellIntentioned-Destruction.aspx" rel="nofollow noreferrer">Well-Intentioned Destruction</a></li> <li><a href="http://thedailywtf.com/Articles/The_Spider_of_Doom.aspx" rel="nofollow noreferrer">The Spider of Doom</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload