ShaolinF
Members-
Posts
314 -
Joined
-
Last visited
Never
Everything posted by ShaolinF
-
lol ok. I see random digits on some websites like index.php?u=e282h892r32t2t32t3 etc why do they do that ? And what is its purpose?
-
What about creating random numbers for no major reason, but to confuse potential hackers?
-
Hi Guys, Is it better to have url endings (page.php?u=1) etc or to leave the site without any endings?
-
Also, could you give me a sample of data I could use in the fields (just to be sure).
-
Well what happens is once someone submits a form they get directed to that page where they confirm their details. The point of the $refer statement is if the user re-submits a form, his new data will over right the old data. EDIT: mysite.co.uk is replaced with my website link. The false is checked by the IF statement which I started the thread with.
-
Thanks. <?php $refer=$_SERVER['HTTP_REFERER']; if($refer == ("http://www.mysite.co.uk/test/") || $refer == ("http://www.mysite.co.uk/test/index.htm") || $refer == ("http://www.mysite.co.uk/test/index.htm/")) { //echo "overwrite session"; $_SESSION['LOGGEDIN'] = FALSE; } else { //do nothing } ?> Can you see any problems with this ?
-
Your a life saver. I still quite new to php and tend to get confused. So in layman terms, would isset() mean whether any content in the $var exists ? !isset($var) // If there is nothing in var then .. isset(var) // if there is something in var do this .. correct ?
-
Well here is a piece of code which could be the cause of the problem. Please run through it and see if you can find any logical errors on the statements. <?php if (!isset($_SESSION['LOGGEDIN'])== FALSE) // If user is not logged in { //Add session //echo "session is not set! User is not logged in" . "<BR>"; $_SESSION['LOGGEDIN'] = TRUE; $_SESSION['NAME'] = $_POST['name']; $_SESSION['CONTACTNO'] = $_POST['contact']; $_SESSION['EMAILADD'] = $_POST['email']; $_SESSION['GENDER'] = $_POST['sex']; $_SESSION['TIME'] = date("D dS M,Y h:i a"); } else { echo "<BR>" . "session is set! User is logged in"; //grab data from cookies if needed } ?>
-
Thanks guys, I was working on some code and it was working fine and now randomly it doesnt want to work no more and Im having to go through all the code, argh!
-
Hey Guys, What does the following code mean ? (!isset($_SESSION['LOGGEDIN'])== FALSE) { }
-
Thanks. Well Im not too good with MYSQL so you'll have to excuse me if I ask some daft questions. The paid is only for a set of tickets, a simple paypal buynow type of button. So how exactly would I create the query, something like this: CREATE userinfo ( Name varchar(255), Gender ENUM, ContactNo varchar(255), EmailAdd varchar(255), TimeOfReg ( ??? ), IP UNSIGNED INT (not sure entirely), Paid ENUM ); What is the purpose of an index name ?
-
Hi Guys, I have the following script to remove sessions etc but its not redirecting at the end: <?php header("Expires: Thu, 17 May 2001 10:17:17 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache"); // HTTP/1.0 session_start(); // Unset session data session_unset(); // Destroy session data session_destroy(); // Now do a redirect header ("Location: http://www.uwisoc.com"); exit; ?>
-
Hey Guys, I want to create a table with the following columns. Can you please give me your recommendations: ID (Must be unique, starting with 00001, id should increment by 1) Name Gender (Male or female) Contact Number Email Address Time Of Registration IP Paid (Yes/No)
-
What if Im using an IF statement ? [code=php:0]<?php if (mail($to, $subject, $mail, "From: ".$email_addr."\r\n")) { echo " Complete"; //Post form, button. } else { echo "Failed"; //refresh page, or contact administrator } $mail = str_replace("\n", "<br>", $mail); ?> [/code]
-
Hey Guys, How would I implement the code below into php ? <div id="continue"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="submit" value="Click to Continue >>" /><img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIIcQYJKoZIhvcNAQcEoIIIYjCCCF4CAQExggEwMIIBLAIBADCB=-----END PKCS7----- " /></form> </div>
-
Ok, thanks. I will start the mysql implementation hopefully.
-
But wouldnt I use MYSQL if I wanted to later view the information on the website or something ?
-
Well I'm not using mysql as of yet. It's simply a small reg/paypal fee and the information gets emailed to me and the client gets a confirmation and a unique ID.
-
That'll do too I guess. So how would I do it ? I'd like it in the 6 digit sphere.
-
Hi Guys, Does anyone know of any good ways of producing ramdon digits (4-8digit) for invoices ?
-
??? You lost me - All I want to do is use SMTP. What will I need to do to the code above inorder to achieve this ?
-
Hi Guys, I want to use SMTP with the following email script: <?php ob_start(); session_start(); //process the post variables... $to = "email@gmail.com"; $name = $_SESSION['NAME']; $email_addr = $_SESSION['EMAILADD']; $gender = $_SESSION['GENDER']; $subject = "Event Tickets"; $phone = $_SESSION['CONTACTNO']; //$msg = $_POST["msg"]; // Construct the message.... $mail = "Hello $name,\n\nThank your for your ticket(s) purchase.\nWe look forward to see you.\n\n"; $mail .= "Here is the information you have given us:\n\n"; $mail .= "Name: ".$name."\n"; $mail .= "Gender: ".$gender."\n"; $mail .= "Email Address: ".$email_addr."\n"; $mail .= "Phone: ".$phone."\n\n"; $mail .= "Subject: ".$subject."\n"; //$mail .= "Your Message:\n".$msg."\n\n\n"; $mail .= "Best Regards,\nUW\n\n"; // If any lines are larger than 70 characters, we will use wordwrap() $message = wordwrap($message, 70); // Send the email... mail($email_addr, $subject, $mail, "From: admin@".$_SESSION['APP_SERVER']."\r\n"); mail ($to, $subject, $message, "From: ".$email_addr."\r\n") $mail = str_replace("\n", "<br>", $mail); ?> What adjustments do I need to make ?
-
Hi Guys, How can I check whether the script sent the email ?
-
Hi Guys, I was on my site when I decided to add a forward slash at the end of my index page and all the css dissapeared. Does anyone know why this happens and how one can resolve it ?