Jump to content

Ingolme

Moderator
  • Content Count

    14,445
  • Joined

  • Last visited

  • Days Won

    105

Everything posted by Ingolme

  1. Ingolme

    a:active

    Just put it between <script type="text/javascript"> and </script> and put it in the <head> of the document.
  2. Well, you first need a basic knowledge of every kind of programming. Flash uses Actionscript. But if you truly know real programming no language should be difficult to learn.You need to learn how to convert what you want done into an algorhythm that the machine can understand.
  3. I'm not exactly sure if this is what you're asking: <?php// Assuming the "get" variable for language is called "lang"switch($_GET['lang']) {case "en":echo "English title";break;case "fr":echo "French title";break;case "es":echo "Spanish title";break;//...//continue with each language//...}
  4. I don't reallyn trust the CSS text because I've never used it. I'd do it this way:var marker = document.createElement('div');marker.style.backgroundImage = 'url (pics/dot.gif)';marker.style.position = 'absolute';marker.style.top = '250px';marker.style.left ='200px';document.body.appendChild(marker);Oh, and if you don't see anything it's because the <div> tag doesn't have any height because there's nothing inside it.You can give it a height:marker.style.height = "200px";
  5. Ingolme

    a:active

    Well, I guess javascript can do it. function init() { a = document.getElementsByTagName("a"); for(i=0;i<a.length;i++) { if(location.href.indexOf(a[i].href) != -1) { a[i].style.color = "white"; } }}window.onload = init;
  6. Ingolme

    PHP Script

    It can be done like this:if($_SERVER['REMOTE_ADDR'] == "xxx.xxx.xxx.xxx") {// do something}
  7. Connect to the database using mysql_connect() and mysql_select_db and then do this:$result = mysql_query("SELECT * FROM table ORDER BY something DESC"); //something would refer to the field you're ordering it by, like date or id. DESC orders it by the newest ones first.while($row = mysql_fetch_array($result)) {echo $row['message'];}
  8. In order to upload files, the <form> tag has to have the enctype attribute:<form action="process.php" method="post" enctype="multipart/form-data">
  9. You forgot to close a quote here:mysql_query("INSERT INTO fanthefire (comments) VALUE('$_POST[message]'");
  10. Did you write & instead of $ next to a variable name?
  11. Ingolme

    Objects

    I mean that there are levels indicated with .s Like root.level1.level2, that uses the . to get into a level.
  12. Ingolme

    Objects

    Not in my knowledge, I haven't investigated much in that. It might be possible but even if you did, it wouldn't look the way it does in other languages, because PHP doesn't have a . level system.
  13. No, the datetime function acts like the PHP date() function except with SQL results. That means you need to have a string before: datetime("Y",$row['date']); would return a four-digit year for example.In order to get the 18 of 2007-11-18, you write datetime("d",$row['date']);
  14. Ingolme

    Objects

    PHP's . is a concatenating operator. PHP doesn't use the . level system.The code I gave you was javascript, that's my mistake.
  15. Here are the steps used to insert data to a database, with simplistic examples:1.<form action="add.php" method="post"><input type="text" name="message" /> *this is important, remember it</form>2.Inside the "add.php" file$msg = mysql_real_escape_string($_POST['message']); // mysql_real_escape_string() prevents messages from interfering with SQL code$con = mysql_connect(" [/i]","username","password");mysql_select_db("[i]database name[/i]",$con);mysql_query("INSERT INTO [i]database table name[/i]([i]field name[/i]) VALUES ('$msg')"); //This query adds the message to the [field
  16. Ingolme

    inserting image

    I'm not sure if <textarea>s can actually contain anything other than text, but you can try this.HTML: Image: <input type="text" id="image" /> <input type="button" value="Click here" onclick="addImage()" /><br /><textarea id="output"></textarea> This goes in the <head> of the document: function addImage() {im = document.createElement("img");im.src = document.getElementById("image").value;document.getElementById("output").appendChild(im);}
  17. Well, you use PHP,SQL and databased to do it. Check this part of the W3Schools tutorial and I think you should have it clear: http://w3schools.com/php/php_mysql_intro.asp
  18. Ingolme

    a:active

    a:active seems to be working ok for me on your site. And you're written it correctly. Maybe you don't understand the active state: active is when the mouse is down on the link.Also, you've applied the same color to the hover link as the active one, so you wouldn't notice the difference.
  19. To submit a form just do this:HTML:<form ... ... id="something">...</form>java script:document.getElementById("something").submit();
  20. No, whatever you want to add to to message you concatenate it as a string using the concatenation operator ( . ):$message = $_POST['company'] . $_POST['address'] . $_POST['number'] . $_POST['email'] . $_POST['message'] . "-fuser@mydomain.com";mail("email@mydomain.com","feedback from website",$message");
  21. Ingolme

    Account Activation

    Hotmail has a lot of spam protection these days and doesn't show links or special content from any mail until you tell it that it's from a trustable source.
  22. Actually, I wasn't sure how to manage the data you sent.I wrote this:$send = mail($_POST['email'],"Subject goes here",$message);However, I thought $_POST['email'] was the email you weere sending it to.Here's an example of how to use the mail() function:mail(to,subject,message,headers);mail("me@mydomain.com","A subject","Hello, this is the message body","From: sender@domain.com");
  23. I think it's better to try this:<a href="java script: history.go(-1);"><img src="pic/tryagain.gif" border=0></a>
  24. Just add the email script to it, something like this: <?php$con = mysql_connect("server IP","username","password");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("databasename", $con);$sql="INSERT INTO table (company, address, number, email, message)VALUES('$_POST[company]','$_POST[address]','$_POST[number]','$_POST[email]','$_POST[message]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }mysql_close($con);/* Modify this line to format the sent message to your liking: */$message = $_POST['message'] . "\n" . $_POST['company'] . "\n" . $_POS
  25. I think it's better, but personally I don't like to waste database tables for that. However, that's basically how Google does it.
×
×
  • Create New...