Jump to content

IceDragon

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

IceDragon's Achievements

Member

Member (2/5)

0

Reputation

  1. i can't get it to work with setlocale().. Maybe i'm not inserting it right, I just get a blank page. $actualTime = date(DATE_FORMAT); $actualTime = setlocale(LC_TIME, 'svn_SVN'); define("DATE_FORMAT","d-m-Y H:i:s a");
  2. IceDragon

    date

    I have the time code but for some reason it is 14 hours and 4 mins behind my time (i can understand then 14 hours difference due to server time difference,, but 4mins??) anyway, how can I fix the code below so it'd show my time.. something like H+14. I know i've seen it somewhere before just don't remember how to do it. $actualTime = date(DATE_FORMAT); define("DATE_FORMAT","d-m-Y H:i:s a");
  3. ok removed.. now the page keeps refreshing again hmm.
  4. ok I've added the quotations and the missing '=' in $answer=="TEST"; It's not refreshing anymore, howevrer after i enter the TEST and click submit it doesn't do anything.. (it should redirect, if TEST entered)
  5. I want to make a textbox in which you would have to type in a certain word to be redirected to some other website after submiting.. but i can't figure out why it is not working.. If I upload this the page just keeps refreshing. here's the code <?php include "wrong.php"; $answer=TEST; if(isset($answer['submit'])) { if($answer==TEST) { print '<META HTTP-EQUIV="Refresh" Content="0; URL=http://somewebsite.com'; exit; } else { print "$wrong<br>"; } } else { print "<form action='index.php' method='post'>"; print "<p align='center'>Answer:<br></p>"; print "<p align='center'><input type='text' name='answer' size='30'><br></p>"; print "<p align='center'><input type='submit' name='submit' align='center' value='Send'></form></p>"; } ?>
  6. @ toonmariner thanks. i did search for it but in most cases i found the 'how to use image map' tutorials or similiar things or programs that aren't free..
  7. i know the html code for putting link areas onto images but i find it hard to pinpoint the desired location of a link on image.. basically i need some kind of program that would tell the location on img (in px) - for example.. you put your mouse at the center of a 100 x 100px img and the display would be 50px left 50px top or something like that.. does anyone know of such a program?
  8. ahh I got it now. Yea I forgot to create it inside the database. But now when I load the page where tables were supposed to be I just get a blank page.. (and yeah I've added the HTML part that wasn't included in previous posts insde php tags)
  9. I've changed it for this forum.
  10. I get Table 'mydbusername.Log' doesn't exist
  11. i meant to ask why doesn't it exist/what have i missed.. I can post the other php code related to this if it helps. Edit: the other code: <?php $user="myusername"; $host="myhost"; $password="mypass"; $database="mydb"; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server"); $db = mysql_select_db($database,$connection) or die ("Couldn't select database"); $ip = $_SERVER['REMOTE_ADDR']; $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $referer = $_SERVER['HTTP_REFERER']; $browser = $_SERVER['HTTP_USER_AGENT']; $currentURL = $_SERVER['REQUEST_URI']; $query = mysql_query("INSERT INTO Log VALUES ('',now(),'$ip',$lang','$referer','$browser','$currentURL')");
  12. ok thanks. I have another problem now.. I get a the mysql_query() error on line 27.. while ( $row = mysql_fetch_array($query) ) i added the 'or die(mysql_error());' to that line.. and now I get the Table 'mydbusername.Log' doesn't exist here's the sql file.. CREATE TABLE `Log` ( `ID` int( NOT NULL auto_increment, `Datum` datetime NOT NULL default '0000-00-00 00:00:00', `IP` varchar(20) NOT NULL default '', `Jezik` varchar (20) NOT NULL default '', `Referer` varchar(255) NOT NULL default '', `Browser` varchar(255) NOT NULL default '', `Trenutni URL` varchar (255) NOT NULL default '', PRIMARY KEY (`ID`) )
  13. I keep getting Parse error: parse error, unexpected $ in /home/www/mywebsite.com/log.php on line 38 line 38 is the last line of log.php (</html>) and I don't have a clue why I keep getting an error.. log.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Logs 2</title> </head> <body> <?php // DATABASE INFORMATION $user="myusername"; $host="myhost"; $password="mypass"; $database="mydb"; // CONNECTING TO YOUR DATABASE $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server"); $db = mysql_select_db($database,$connection) or die ("Couldn't select database"); // GETTING THE VISITOR INFORMATION FROM YOUR TABLE $query = mysql_query("SELECT * FROM Log ORDER BY ID DESC"); // GETS AND DISPLAYS THE ROWS IN YOUR TABLE while ( $row = mysql_fetch_array($query) ) { $id = $row['ID']; $date = $row['Datum']; $ip = $row['IP']; $lang = $row['Jezik']; $referer = $row['Referer']; $browser = $row['Browser']; $currentURL = $row['Trenutni URL']; ?> </body> </html>
  14. I want to add a google search form to my website which would also record the keywords that are searched by visitors.. How do I do that?
  15. ah. Silly me Thanks! btw, how come you're always the one to answer my problems?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.