Search the Community
Showing results for tags 'halp'.
-
Hey guys, So long story short: I've got an assignment due in two weeks time. I'm going away next weekend so want to finish it before then. Problem is, we haven't covered all the necessary material in class yet, and would be expected to work on it over the final weekend it is due. I have a partner for this, but he is of no use in any IT subject. I would greatly appreciate if anyone could direct me to online tutorials or such, because I don't know how to do the following: construct the form so that the data can be written to a file in a way it can later be read, how to actually write this data to file, how to retrieve and read it. The assignment in short: Develop a form-based Web application that provides the following functionality: o Selection of a shape to develop o Creation of a collection of shapes o Various user queries of your own choice A system developed using object-oriented php which supports inter alia: o Various shapes o A collection of shapes o File I/O The pitiful excuse I have so far gives me this: http://www.aberdonia.com/aberdonia/web-dev/coursework/testing/showshapes.php
-
OK, I'll keep this short n sweet. Goal: If a specific variable is declared in the URL, assign it to a session and refresh the page without the variable. Here's my code: if(isset($_SESSION['referrer'])){ $referrer = $_SESSION['referrer']; }else{ if(isset($_REQUEST['referrer'])){ $referrer = $_REQUEST['referrer']; }else{ $referrer = $no_referrer; } } $_SESSION['referrer'] = $referrer; if(isset($_REQUEST['referrer'])){ header("Refresh:0, url=/"); } Expected result: If the url http://testsite.com?referrer=abc123 is entered, check for existing session. If it doesn't exist, create one from $_REQUEST['referrer']. Then, check if $_REQUEST['referrer'] exists. If it does, immediately go to the root of the domain (this is located at the root of the domain) so that the url displayed is http://testsite.com instead of the ugly referrer showing. Actual Result: Works great on Chrome, Firefox, Safari, Opera, and Android 4.2.2's web browser, however in IE 8 through IE 11, that code presents an infinite header(); loop. It's executing the header("Refresh:0, url=/"); regardless of whether $_REQUEST['referrer'] is set or not