Jump to content

canadezo

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

canadezo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I know it should seem easy; but I have no jQuery knowledge at all; I want to know how to remove the automatically generated tabs in Coda Slider http://www.ndoherty.biz/demos/coda-slider/1.1.1/. Any info would be helpful!
  2. I want to have a edit content thing; for a site of mine; I want one... kinda pre-made so all I gotta do is change the little coding around; I don't want to go through databases and huge configurations, like ckeditor wants me to; however, that is something that I want. How can I do this? maybe a simple php require_once (aboutme.txt) and to edit it will be like a little form that edits aboutme.txt... I don't know; any information at all will be extremely helpful! Thanks.
  3. I was wondering how you can make a hover effect on an image. I seen it done many times before; to be a little more detailed; when you hover an image, on the top right corner there will be an "X"... The point is so that viewers can hover over an image they don't want and the X will be the delete button; and of course, when they take the mouse off the picture, the X goes away. I'm sure most of you may have seen it done before.
  4. How can you use IP validation saved from a text file? Here's an example of what I'm trying to do... <?php if IP 'InternetProtocal.txt' , then it script allows to view the page; else show message like "you don't have permision to view this page"; ?> I do understand that above will not work; it's just so you can get an idea of my goal...
  5. That's excellent, straight forward, I love it. I'm going to use that; and save myself a lot of time. =)
  6. What can I do to make it so only the first person that viewed the page gets their IP saved in a single text file, the purpose is to have IP validation instead of password... (I understand the consequences, no need in explaining that) So; when they click to the page they're directed to, it saves their IP in a text file (or that same file if possible)... Any idea's?
  7. I'll post the entire page that I'm working on, and the index file I'm copying is from the same directory as this file; so I assumed that should work, correct me if I'm wrong. <?php // set our absolute path to the directories will be created in: $path = $_SERVER['DOCUMENT_ROOT'] . '/albums/'; if (isset($_POST['create'])) { // Grab our form Data $dirName = isset($_POST['dirName'])?$_POST['dirName']:false; // first validate the value: if ($dirName !== false && preg_match('~([^A-Z0-9]+)~i', $dirName, $matches) === 0) { // We have a valid directory: if (!is_dir($path . $dirName)) { // We are good to create this directory: if (mkdir(!$path . $dirName, 0775)) { $success = "Your directory has been created succesfully!<br /><br />"; }else { $error = "Unable to create dir {$dirName}."; } }else { $error = "Directory {$dirName} already exists."; } }else { // Invalid data, htmlenttie them incase < > were used. $dirName = htmlentities($dirName); $error = "You have invalid values in {$dirName}."; } } ?> <?php if (isset($_POST['create'])) { $file = 'index.html'; $newfile = ($dirName . 'index.html'); if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } } ?> <html> <head><title>Make Directory</title> <style type="text/css"> a:link { COLOR: #fff; } a:visited { COLOR: #fff; } a:hover { COLOR: #fff; } a:active { COLOR: #fff; } </style> <script type="text/javascript"> function delayedRedirect(){ window.location = "/default.aspx" } </script> </head> <body text="#FFFFFF"> <center><?php echo (isset($success)?"<h3>$success</h3>":""); ?> <h2><font color="black">Add your name & pics</font></h2> <?php echo (isset($error)?'<span style="color:red;">' . $error . '</span>':''); ?> <form name="phpMkDIRForm" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" > <font color="black">Enter Your Name (No Spaces or Symbols):<BR> <input type="text" value="" name="dirName" /><br /> <input type="submit" name="create" value="Add Pics" /> </form></center> </body></font> </html>
  8. So far everything is working swell; except for the file creation. What the website is going through is the user inputs their name and a directory is created for them. Now; the file creation thing is what's messing me up. As soon as they create that new directory I would like to appoint an index.html to it... This is what I got so far; let me know where I messed up, please & thank you! =) <?php if (isset($_POST['create'])) { $file = 'index.html'; $newfile = ($dirName . 'index.html'); if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; } } ?>
×
×
  • 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.