Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. This is really odd, but it can't possibly be Firefox that caused the problem.
  2. [s]Other people's scripts and tutorials. I've never read a single book on programming or PHP.[/s] Edit: I missed something: I have read other people's scripts and tutorials. I've never read a single book on programming or PHP.
  3. I've heard people who think that Internet Explorer is the internet, so I don't think that IE will be a thing in the past for the next many years.
  4. Store the settings in a database, or make the admin panel edit the config file.
  5. I couldn't remember if a session variable could contain an array, and I didn't bother to test it. If it works, then just do that.
  6. Sure. Serialize makes you able to store an array as a string, eg [code]array('description' => 'hello');[/code] would become [code]a:1:{s:11:"description";s:5:"hello";}[/code] Unserialize reverses the process. This line: [code]$_SESSION['data'] = serialize($_POST);[/code] serializes the POST array and stores it as a session variable called data. This line (in the other file): [code]$data = unserialize($_SESSION['data']);[/code] defines the array $data the session variable data unserialized. This: [code]<?php echo $data['description']; ?>[/code] simply echoes the value of $data['description'] [b]EDIT:[/b] [quote author=redarrow link=topic=104950.msg418893#msg418893 date=1156086499] i read the manual but surly a session can do the same as the above posted code. [/quote] The code [i]did[/i] use sessions ;)
  7. example_result.php: [code]<?php session_start(); if($description=="none"){ $_SESSION['data'] = serialize($_POST); echo "sorry try agin <br> <a href='example.php'>try agin please</a>"; } ?>[/code] example.php: [code]<?php session_start(); $data = unserialize($_SESSION['data']); ?> <html> <head></head> <title>test form</title> <body> <form method="POST" action"" <br> description please <textarea  name="description" cols="200" rows="200"><?php echo $data['description']; ?></taxtarea> <br> </td> </table> </form> </html> [/code] This should do it.
  8. [code]<?php function add_days($current_time,$days,$format='d/m/Y') { return date($format,strtotime($current_time)+86400*$days); } echo add_days('22/06/1983','6'); ?>[/code]
  9. [quote author=AndyB link=topic=104825.msg418576#msg418576 date=1156006705] there is no attribute "height" - I assume that's in a table.  There is no height attribute for a table, the height is dictated by the content. [/quote] You could use the min-height CSS property, but since IE don't have full CSS support, it don't work in IE, there is some sort of workaround though (can't remember where I read it).
  10. I wouldn't store their page in a file, but I would store the contents of the page in the database. You could use BBCodes too.
  11. [quote author=Jocka link=topic=104692.msg417743#msg417743 date=1155860426] (ITS NOT LETTING ME POST MY JAVASCRIPT CODE SO IM THROWING SOME B/S STUFF IN THERE TO 'HIDE' IT) [/quote] It's because of their Intrusion Prevention System (IPS). More info here: http://www.phpfreaks.com/forums/index.php/topic,104265.0.html
  12. http://php.net/manual This is really good to read ;) http://www.hudzilla.org/phpbook/ <<< this one is quite good too
  13. [code] <h1>CSV Domain Check</h1> <?php $row = 1; $handle = fopen("file.csv", "r"); while (($data = fgetcsv($handle, 500, ",")) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { $handle2 = fopen($data[$c], "r"); $contents = stream_get_contents($handle2, 1024); if (preg_match('/.*Coming Soon!.*/', $contents, $result)) { echo $data[$c] . "<br />\n"; } else { } } fclose($handle2); } fclose($handle); ?>[/code] Try that.
  14. So you need help with mod_rewrite?
  15. I don't get what you try to do.
  16. If it's just Apache's directory view, then I don't think you can. You could read the log file though.
  17. [code]<?php $array = array_fill(0,9,'0'); ?>[/code] Will make ten keys with the value 0.
  18. You could also use something like [code]wget http://example.com/whatever_file.html[/code] to download the HTML source code to view it. And if you use Firefox (I don't know if it works in other browsers), you could type something like view-source:http://www.phpfreaks.com in your address bar to view the source.
  19. This will not solve your problem, but instead of using: [code]<input type="submit" name="unsubscribe" value="" style="background:url(images/index_22.gif); width:66px; height:16px; border:none;" />[/code] I think you should use: [code]<button type='submit' name='unsubscribe'><img src='images/index_22.gif' alt='unsubscribe'></button>[/code]
  20. Daniel0

    select

    [quote author=BillyBoB link=topic=104594.msg417757#msg417757 date=1155865188] dude...... HAVE YOU EVER HEARD OF GOOGLE.COM ITS THE BEST  >:( >:( >:( >:( [/quote] You know, this forum is for getting [i]help[/i], so he obviously asks for help here.
  21. Use [i]X[/i]HTML. Transitional will do fine, but if you use Strict, there will be less things allowed (such as using the align attribute). Use Frameset on a page where there is a frameset. I'm not really sure if there is any benefits of using Strict instead of Transitional. You can validate your code agains the DOCTYPE you chose at http://validator.w3.org
×
×
  • 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.