PHP - Newby Help! :(
Hei,
please can anyone help me? I guess it's done with if function - i can be wrong too. :/ I want to get about the same "step by step" stuff.. Look example: http://p6lva.eu/site/realinfo.php I tried by my own, but I failed too much : <?php $nick = $_GET['nick']; $server = $_GET['server']; $teenus = $_GET['teenus']; if (!empty($nick) && $server === null) { echo "<center>Choose server:<br><br>\n <a href='realinfo.php?server=1&nick=$nick' style='text-decoration: none;'><button style='width: 250px; text-align: left;'><center>\n Server 1</center></button></a> </center>"; } else { echo ""; } if (!empty($server) && $teenus === null) { include "service1.php"; } else { echo "show frontpage"; } if (!empty($teenus)) { if ($teenus === vip && $server === 1) { include "vip.php"; } if ($teenus === admin && $server === 1) { include "admin.php"; } } else { echo "You must choose service!!! Or this service doesnt in our database!!!"; } if (isset($nick) || isset($server) || isset($teenus)) { // if not added one of the values - like $server, $nick or $teenus then show frontpage echo ""; } else { include 'frontpage.php'; } ?> HELP Similar TutorialsOk so this is what I am looking for and I cannot seem to find any documentation on it! I have some html files which I want to call up by using the following: engine.php?id=? with the questionmark being 1,2,3,4,5,6, etc... where each number is a different HTML page, I just want it to look a little cleaner then if I just have it redirect to each page itself I mean come on what looks better: http://localhost/engine.php?id=1 <------ http://localhost/home.html Any guidance is welcome. Thanks, Drew Hello. Assuming that I have two variables: $exURL=@$HTTP_REFERER; $goodURL = 'http://www.SomeSite/login/'; How can I check if the two URLs match each other? Regards hmmmm my last post got deleted due to my naughty url:-( Anyway its not spam :-( hear is my real problem. I HAVE this form in a iframe in a drupal site.....I followed many tutorials but it seems fine? It keeps downloading the actual php file instead of posting to my email? form code/////////////// <form action="EnquirySend.php" method="post" enctype="application/x-www-form-urlencoded" name="Enquiry_Form" target="_self" id="Enquiry_Form"> <div class="demo"> <div id="Col1"> <p>Date Departing:</p> <p>Date Returning</p> <p>Name<span style="font-size: 16px; "><span style="color: rgb(255, 0, 0); ">*</span></span> : </p> <p>Phone<span style="font-size: 16px; "><span style="color: rgb(255, 0, 0); ">*</span></span> : </p> <p>Email:<span style="font-size: 16px; "><span style="color: rgb(255, 0, 0); ">*</span></span> : </p> <input name="button" type="submit" class="demo" id="button" value="Submit your Enquiry"> </div> <div id="fieldsAline"> <input name="departing_Date" type="text" id="departingDate"></p> <p> <input type="text" id="returnDate"></p> <p> <input maxlength="20" name="name" size="20" style="cursor: default; " type="text" /></p> <p> <input maxlength="20" name="phone" size="20" style="cursor: default; " type="text" /></p> <p> <input maxlength="30" name="email" size="20" style="cursor: default; " type="text" /></p> </div> <p><div id="Col2"> <div id="topCol2"><p>Number Travelling: <span style="font-size: 16px; "><span style="color: rgb(255, 0, 0); ">*</span> <input maxlength="2" name="number" size="3" type="text" value="1" /> PostCode :<input name="postcode" type="text" id="postcode" size="5" maxlength="5"> </p> <p>Can we help you with any extras?</p> <p> <textarea name="extras" id="extras" cols="45" rows="3">Are you interested in 5 star accommodation? </textarea> </p> <p> Which Holiday Package are you interested in <span style="font-size: 16px; "><span style="color: rgb(255, 0, 0); ">*</span></span> ? <br><br> <label> <input type="radio" name="package" value="radio" id="manila"> <span style="color:#0CF">Manila</span></label> <label> <input type="radio" name="package" value="radio" id="manila_boracay"> <span style="color:#0CF">Manila & Boacay</span></label> <br> <label> <input type="radio" name="package" value="radio" id="Manila_angeles"> <span style="color:#0CF">Manila & Angeles</span></label> <label> <input type="radio" name="package" value="radio" id="Manila_Cebu"> <span style="color:#0CF">Manila & Cebu</span></label> <br> <br><br> </p></div></div></div> </form> HERE IS THE RESPONDER PHP FILE CODE/////////// <?php //--------------------------Set these paramaters-------------------------- // Subject of email sent to you. $subject = 'Enquiry_Form '; // Your email address. This is where the form information will be sent. $emailadd = 'sales@hotasiantour.com'; // Where to redirect after form is processed. $url = 'www.hotasiantour.com'; $departing_Date = $_REQUEST['departingDate'] ; $returning_Date = $_REQUEST['returningDate'] ; $Name = $_REQUEST['name'] ; $Phone = $_REQUEST['phone'] ; $Email = $_REQUEST['email'] ; $Number_comming = $_REQUEST['number'] ; $postcode = $_REQUEST['postcode'] ; $Any_extras = $_REQUEST['extras'] ; $holiday_package = $_REQUEST ['package'] ; // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty. $req = '0'; // --------------------------Do not edit below this line-------------------------- $text = "Results from form:\n\n"; $space = ' '; $line = ' '; foreach ($_POST as $key => $value) { if ($req == '1') { if ($value == '') {echo "$key is empty";die;} } $j = strlen($key); if ($j >= 20) {echo "Name of form element $key cannot be longer than 20 characters";die;} $j = 20 - $j; for ($i = 1; $i <= $j; $i++) {$space .= ' ';} $value = str_replace('\n', "$line", $value); $conc = "{$key}:$space{$value}$line"; $text .= $conc; $space = ' '; } mail($emailadd, $subject, $text, 'From: '.$emailadd.''); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">'; // -----------------------auto responder-------------------------- $responseSubject = "Your request has been received"; $responseMessage = "Hello,\n\nThanks for submitting your request. One of our agents will be in contact with you shortly.\n\nKind regards,\nYour Company"; $responseFromName = "Hot Asian Tours"; $responseFromEmail = "sales@hotasiantour.com"; mail($fromEmail, $responseSubject, $responseMessage, "From: ".$responseFromName." <".$responseFromEmail.">"); ?> Hi, I've inherited a website with a problem! Basically the site runs pommo mailing list, which has worked fine for years. Recently though the website domain name changed. Since then - or at least at a similar time - pommo has just stopped working completely. It does nothing but outputs blank pages. I've never done any php development so I've no idea where to start in terms of debugging this. I've checked that the files etc all exist on the server: they do. I've uploaded a test html page which works. I've uploaded a test php page containing: <?php phpinfo( ); ?> and it works. But when I visit any page in the pommo application, the browser just renders a totally empty white page - no source HTML at all, just nothing! Can anyone suggest how to debug this? Even an error message would be somewhere to start. Thanks all! |