Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Chocolate570

  1. Hehe, i'm at the same place you are in php. :)I don't understand. You're using a php page to go to another page and pass the variables of the current page to the next page?Hmm... your problem is is that this isn't INSIDE the php script. If it were between the <?php and ?> tags, it would work perfectly. But i'm guessing it's not inside the tags, so it's passing $thing instead of the VALUE of $thing. One way to do this is echo this inside the php and it should work. Do you understand what i mean? For example,<?php$thing = $_GET['thing'];echo $thing;?>Where 'thing' is the html to create your form.

  2. Yes, flash sites annoy me, since I have T3 and a really bad computer. Sure, it downloads in a jiffy, but then the stupid thing has gotta load in my browser.....if i have to visit a flash site, then i close all other windows. :)Amazing design. It's sweet, clean, and fast. 9/10 'coz i don't really like the nav menu to the left. The background highlight color could be changed to match the site in general, but otherwise, perfecto! :)

  3. Easy. Put this code in the place you want the words to appear:

    <html><head><script type="text/javascript">function getCookie(c_name){if (document.cookie.length>0){c_start=document.cookie.indexOf(c_name + "=")if (c_start!=-1){c_start=c_start + c_name.length+1c_end=document.cookie.indexOf(";",c_start)if (c_end==-1) c_end=document.cookie.lengthreturn unescape(document.cookie.substring(c_start,c_end))}}return null}function setCookie(c_name,value,expiredays){var exdate=new Date()exdate.setDate(expiredays)document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate)}function checkCookie(){username=getCookie('username')if (username!=null) {datetoday = new Date();timenow=datetoday.getTime();datetoday.setTime(timenow);thehour = datetoday.getHours();if (thehour > 18) display = "Evening";else if (thehour >12) display = "Afternoon";else display = "Morning";document.getElementById("thing").innerHTML='Good '+display+' '+username+'!'}else { username=prompt('Please enter your name:',"") if (username!=null||username!="")   {   setCookie('username',username,365)   } }}</script></head><body onLoad="checkCookie()"></body></html>

    -codebox :)

  4. Overall code, i used the w3schools js example:

    <html><head><script type="text/javascript">function getCookie(c_name){if (document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "=")if (c_start!=-1){ c_start=c_start + c_name.length+1 c_end=document.cookie.indexOf(";",c_start)if (c_end==-1) c_end=document.cookie.lengthreturn unescape(document.cookie.substring(c_start,c_end))} }return null}function setCookie(c_name,value,expiredays){var exdate=new Date()exdate.setDate(expiredays)document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate)}function checkCookie(){username=getCookie('username')if (username!=null)  {datetoday = new Date();timenow=datetoday.getTime();datetoday.setTime(timenow);thehour = datetoday.getHours();if (thehour > 18) display = "Evening";else if (thehour >12) display = "Afternoon";else display = "Morning";alert('Good '+display+' '+username+'!')}else   {  username=prompt('Please enter your name:',"")  if (username!=null||username!="")    {    setCookie('username',username,365)    }  }}</script></head><body onLoad="checkCookie()"></body></html>

    -codebox :)

  5. Coldfusion and others aren't as popularly used as javascript and php and asp, therefore until the demand for pages of them increases, i don't think it's a good idea to invest the time into making a tutorial.Java does need a plugin to view. Plus like i said earlier, java is like the english language...there are so many things to learn!

  6. You might wanna set the id of slot1 to "slot1" and then use this script:

    function intialize(){ numberOfPics = 3  slotOneInt = createRandomNumber(1, numberOfPics)  // Returns a number  slotOneTime = createRandomNumber(2, 5) * 1000      //  Returns a number  var sourceName = sourceGenerator(slotOneInt)          //  Returns a string  document.getElementById("slot1").src = sourceName//timer()

  7. Basic consolidated ideas from this post:-Visual Basic is the visual sibling of vbscript.-Visual Basic is good for making simple program interfaces for windows-VBscript is the web based visual basic-VBscript was created by MS to counter javascript-Visual Basic should be learnt if you are a techinician for a company-Visual Basic is quite simple-VB and VBScript use the same codingThat should help a bit.

    Mail()

    How do I set the outgoing mail server and account and all the stuff needed to send an email? Here's my current script, which thinks it has sent the email but doesn't:

    <?php$system = "PHPRULES";require("common.php");head("*","","News",""); $to="chocolate570@gmail.com"; if (!isset($_POST["send"])){   // no post data -> display form   ?>   <form method="POST" action="<?=$_SERVER['PHP_SELF'];?>">   <table>   <tr>   <td width="10">   To:</td> <td width="10">Chocolate570@GMail.com</td></tr>   <tr><td width="10">From:</td> <td width="10"><input type="text" name="sender"></td></tr>   <tr><td width="10">Subject:</td> <td width="10"><input type="text" name="subject"></td></tr>   <tr><td width="10">Message: </td></tr><br />   <tr><td width="10"><textarea name="message" rows="10" cols="60" lines="20"></textarea></td></tr>   <tr><td width="10"><input type="submit" name="send" value="Send"></td></tr>   </form>   <?  }else{   // found post data .. deal with it   $from=$_POST['sender'];   // send mail :   if (mail($to,$_POST['subject'],$_POST['message'],"From: $from\n")){     // display confirmation message if mail sent successfully     echo "Your mail was indeed sent to $to. It will be checked as soon as possible."; }else{   // sending failed, display error message    echo "We are sorry, your email could not be send. Try again later.";   } }tail("","",""); ?>

    What am I doing wrong?

  8. I guess that could be a good idea, except how long would the script/code stay on the server? Most problems don't get solved in a day, as you know. And if you let too much stay on the server, you'll be losing bandwidth and the server will slow down. If you keep them there for a day, then chances are the problem didn't get solved yet. So that's one problem.

×
×
  • Create New...