
The Eagle
Members-
Posts
132 -
Joined
-
Last visited
Never
Everything posted by The Eagle
-
@newbtophp Yes, I agree, that's why I stated it wasn't a stronghold, but some people don't support JavaScript or enable it, I still think PHP is a better option to go with this.
-
Inserting the data retrieved into a text database isn't really a good choice for taking quizzes, your solution would be a MySQL database or even emailing the answers to somebody.
-
Can be easily done, if you'd want I can write up a small PHP application for you. Just a question, is it the same day every month? I'd assume so.
-
I'd say PHP, some browsers may not have JavaScript (not a stronghold but just my example). echo date('l jS \of F Y h:i:s A');
-
What I posted will work, but you cannot trust it always. It can be sometimes forged or not even set at all, they could have opened it up in a new window and the referrer is pretty much garbage then.
-
So many bumps... eventually your question will be answered not really a need to bump it constantly. $refer = $_SERVER["HTTP_REFERER"]; echo "$refer"; Why not use that?
-
At PHPFreaks, we're here to help you when you need assistance, not here to write the code for you. Also this seems like a lot of work, maybe we'd be glad to write a few lines but designing an entire module for you will not happen.
-
News portal --> need suggestions or say help
The Eagle replied to onlysumitg's topic in PHP Coding Help
For instances such as this your best way to go is MySQL databases. -
How to find which checkbox(s) selected and get their values ?
The Eagle replied to htetnainglynn's topic in PHP Coding Help
Since your issue seems to be resolved, you can help keep the forums tidy by marking this topic solved. -
I thought it would display an error if the name was already taken.
-
Erm, yes I figured that out after I posted. I moved it from top of webpage to just above my banner... and it's fixed on all browsers (what I try to aim for) thanks. (http://vazzer.net/) Solved.
-
The code below is used to record how many current visitors are on my website, when I have it below it messes up my navigation (ONLY ON IE). Google Chrome and Firefox are fine, I remove the echo [at bottom] and it's fixed. <?php $dataFile = "visitors.txt"; $sessionTime = 100; //this is the time in **minutes** to consider someone online before removing them from our file error_reporting(E_ERROR | E_PARSE); if(!file_exists($dataFile)) { $fp = fopen($dataFile, "w+"); fclose($fp); } $ip = $_SERVER['REMOTE_ADDR']; $users = array(); $onusers = array(); //getting $fp = fopen($dataFile, "r"); flock($fp, LOCK_SH); while(!feof($fp)) { $users[] = rtrim(fgets($fp, 32)); } flock($fp, LOCK_UN); fclose($fp); //cleaning $x = 0; $alreadyIn = FALSE; foreach($users as $key => $data) { list( , $lastvisit) = explode("|", $data); if(time() - $lastvisit >= $sessionTime * 60) { $users[$x] = ""; } else { if(strpos($data, $ip) !== FALSE) { $alreadyIn = TRUE; $users[$x] = "$ip|" . time(); //updating } } $x++; } if($alreadyIn == FALSE) { $users[] = "$ip|" . time(); } //writing $fp = fopen($dataFile, "w+"); flock($fp, LOCK_EX); $i = 0; foreach($users as $single) { if($single != "") { fwrite($fp, $single . "\r\n"); $i++; } } flock($fp, LOCK_UN); fclose($fp); if($uo_keepquiet != TRUE) { // echo '<b>' . $i . ' visitors online</b>'; } ?> What's the problem?
-
Well you can try replacing like @ in the email. <?php $str = str_replace("@", "(at)", $post); echo $post; ?> So if somebody posts [email protected] it will show bob(at)bob.net.
-
HTML Emails sent with PHP mail() are displayed in plain text?
The Eagle replied to gergy008's topic in PHP Coding Help
Whenever I used PHP mail I'd do this and it'd work. // message $message = ' <html> <head> <title>Hi</title> </head> <body> <p>text!</p> </body> </html> '; -
Andy-H is right. You should stop using these for safety precautions.
-
You'll need to carry the MySQL data, I don't recall sessions carrying all that information to be safe.
-
Try with the spacing. Also $this (I thought it was a pre-defined variable) isn't defined but I am not too sure if that's the issue. echo " .$this->$test. ";
-
You want some clean coding, you should watch for spelling mistakes. You spelled the word password incorrectly below. Also, your PHP code is looking for "user_name" where you have not sent it, your form is sending data with "name" so take the below code and replace it with your HTML form and see how it works.
-
Pretty sure mkdir will do you just fine with this, I think below will work not sure you can try. $thisdir = getcwd(); if(mkdir($thisdir ."/filename" , 0777)) /// $thisdir = directory script is in || /filename is the filename || 0777 is perms { echo "Directory has been created successfully..."; } else { echo "Failed to create directory..."; }
-
I've never saw them headers used in that format before, I've always used. mail( "$youremail", "$subject", $message, "From: $email" );
-
Well, I am not too familiar with CuteFTP. You can right click the directory images, go to Permissions or Properties ~> and make it Read Only. This should work because it definitely seems your host is a Windows server.
-
Anuktha, I do not understand your question. What do you need help with us on this script?
-
Well, you have to elaborate more, we cannot go to that localhost as it is on your computer, what exactly do you want to do? <a href="/">this?</a>
-
Not exactly, just your script because it needs it to be CHMODDED to move folders (and I think write to it).