Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. owell... i can just do it the other way write page <--> preview --> send
  2. sure... if i wanted to do both at the same time... but i want them seperate... - button on [preview] --> opens popup, shows what email will look like, can view changes and the likes(doesnt submit original page); - button two [send] --> submits the form, sends email
  3. then how can i do something like that? i need one to open a popup with all of the info from a textarea... then a send link to submit emails with the info from the same textarea
  4. tinymce is where its at! reletivly quick load time, HUGE program... lots of functions... highly configurable, easy, FREE! lol
  5. anyone know how to forms within forms? i need to be able to send the same information to two seperate pages, from $_POST <?php print_r($_POST); ?> <form action="?" method="post" name="two"> <input type=hidden value="two" name="twos"> <form action="?" method="post" name="one"> <input type=hidden value="one" name="ones"> <a href="javascript:void(document.one.submit())">one</a> </form> <a href="javascript:void(document.two.submit())">two</a> </form> that gives me a java error of "Error:'document.one' is null or not an object"
  6. you do need write privaliges to the folder as well
  7. checkboxes always do have a default on/null value, if not checked, then php's empty() can sort from there just the same :-)
  8. try using empty()... its much more effective at form validation...
  9. $_SERVER['QUERY_STRING'] that'll return everything after the ?
  10. you have your variable saved into $GLOBALS['MM_Username']... not $_SESSION[MM_Username]
  11. ohok... never mind... the ones not set dont have any major towns lol problem solved :-D that function is free whoever wants...
  12. yes... i found that... it was a list of the major towns in each timezone... but thats not the list of all the php settings i found most of em... still missing a few tho :-(... <?php function set_timezone($timezone="0"){ switch($timezone){ case "-12": date_default_timezone_set(''); break; case "-11": date_default_timezone_set('Pacific/Apia'); break; case "-10": date_default_timezone_set('Pacific/Honolulu'); break; case "-9": date_default_timezone_set('America/Anchorage'); break; case "-8": date_default_timezone_set('America/Los_Angeles'); break; case "-7": date_default_timezone_set('America/Denver'); break; case "-6": date_default_timezone_set('America/Chicago'); break; case "-5": date_default_timezone_set('America/New_York'); break; case "-4": date_default_timezone_set('America/Halifax'); break; case "-3": date_default_timezone_set('America/Sao_Paulo'); break; case "-2": date_default_timezone_set(''); break; case "-1": date_default_timezone_set('Atlantic/Azores'); break; case "0": date_default_timezone_set('Europe/London'); break; case "1": date_default_timezone_set('Europe/Paris'); break; case "2": date_default_timezone_set('Europe/Helsinki'); break; case "3": date_default_timezone_set('Europe/Moscow'); break; case "4": date_default_timezone_set('Asia/Dubai'); break; case "5": date_default_timezone_set('Asia/Karachi'); break; case "6": date_default_timezone_set(''); break; case "7": date_default_timezone_set('Asia/Krasnoyarsk'); break; case "8": date_default_timezone_set(''); break; case "9": date_default_timezone_set('Asia/Tokyo'); break; case "10": date_default_timezone_set('Australia/Melbourne'); break; case "11": date_default_timezone_set(''); break; case "12": date_default_timezone_set('Pacific/Auckland'); break; } } ?>
  13. i'm not sure if anybody else has built a function like this... but if you have, i'd be more then grateful... it'd be real nice to be able to switch timezones in reatltime efficiently... <?php function set_timezone($timezone="0"){ switch($timezone){ case "-12": break; case "-11": break; case "-10": break; case "-9": break; case "-8": break; case "-7": break; case "-6": break; case "-5": break; case "-4": break; case "-3": break; case "-2": break; case "-1": date_default_timezone_set('Atlantic/Azores'); break; case "0": date_default_timezone_set('Europe/London'); break; case "1": date_default_timezone_set('Europe/Paris'); break; case "2": date_default_timezone_set('Europe/Helsinki'); break; case "3": break; case "4": break; case "5": break; case "6": break; case "7": break; case "8": break; case "9": break; case "10": break; case "11": break; case "12": break; } } ?>
  14. does anybody got a list of all the "date_timezone_set('x')" available? i specifically want eastern standard time... but the rest would be good to know too:-)
  15. scrap the "if (!isset($_SESSION)) {" session_start(); on its own will start a session, if its not already started...
  16. exactly... if the flash is loading the php seperatly... which i'm pretty sure it does... it "should" set the current webpage to the referrer, so if you just drop the current url into the php, it "should" work...
  17. i'm not sure about flash loaded php... but you can always try to use the referrer on the php... [code] <? function get_referrer(){ if(!$ref=@$HTTP_REFERER) $ref=$_SERVER['HTTP_REFERER']; return $ref; } if(get_referrer()=="yourwebpagehere.swf"){ #rest of your code } ?> [/code] that much said... i'm not sure if you load php from flash, that you'll get the right referrer... just an idea...
  18. never mind... found an easy enough way... var w=0 var h=w*1+1
  19. why does it output 01? i just need a simple math to add two numbers without making it a string... [code] var w=0; var h=w+1; [/code]
  20. [code]<? $result=mysql_query("SELECT * FROM table"); $i=0; echo '<table>'; while($row=mysql_fetch_array($result)){ if($i==0) echo '<tr>'; echo ' <td>'.$row[columnname].'</td>'; $i++; if($i==3){   $i=0;   echo '<tr>'; } } echo '</table>'; ?>[/code]
  21. heres the code to get an ip address... but you will also need an array/database of allowed ip addresses... [code]<? function get_ip(){ if(!$ip=@$REMOTE_ADDR) $ip=$_SERVER['REMOTE_ADDR']; return $ip; } ?>[/code] [code] #set array of allowed ip's here $allowed=false; foreach($allowedips as $allowedip) if($allowedip==get_ip()) $allowed=true; if(!$allowed) die("access restricted"); [/code]
  22. ok... first problem... your treating php like its javascript... [s]var[/s] [code] <html> <head> <title>Test</title> </head> <body> <h1>Test</h1> <p>Paragraphs...bla bla bla....</p> <?php $tree = true; $twig = true; $appletree = "<ul><li>I like Apples</li><li>Apples are good</li></ul>"; $stick = "There is no tree here, just a stick!"; if($tree) echo $appletree; elseif($twig) echo$stick; ?> [/code]
  23. sessions are stored within the browser... that is a fact... and cookies are stored in the computers temp files... thats a fact... so... if php cant get to the browser or to the temp files... how? if sessions were sent along with the headers... why do you need to session_start()? and if cookies were sent along with the headers? why do they error out(headers sent error) when you try to get them after outputing data?
×
×
  • 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.