Jump to content

redfinger

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by redfinger

  1. hey guys l just finished learning javascript and want to build a simple image slider. l tried using array but it just won't slide l would like to know to build one without jquery. you can direct me to a site that explains the process or just paste the code here..thanks ahead.
  2. hey guys please l need help with my css drop down menu.l got the 1 level drop down right but cant seem to be able to add the 2 nd level. this is the code html <ul id="navbar" > <li><a href="#">HOME</a></li> <li><a href="#">COMPANY</a></li> <li><a href="#">PRODUCTS</a> <ul> <li><a href="#">Steel Profile</a></li> <li><a href="#">Steel Pipe</a> <ul> <li><a href="#">welded steel pipe</a></li> <li><a href="#">seamless steel pipe</a></li> </ul> </li> <li><a href="#">Steel Coil</a></li> </ul> </li> <li><a href="#">PROFILE</a></li> <li><a href="#">SALES NETWORK</a></li> <li><a href="#">CONTACTS</a></li> <li> </ul> css #navbar { margin: 0; padding: 0; height: 1em; } #navbar li { list-style: none; float: left; } #navbar li a { display: block; padding: 3px 8px; background-color: #5e8ce9; color: #fff; text-decoration: none; } #navbar li ul { display: none; width: 10em; /* Width to help Opera out */ background-color: #69f;} #navbar li:hover ul { display: block; position: absolute; margin: 0; padding: 0; } #navbar li:hover li { float: none; } #navbar li:hover li a { background-color: #69f; border-bottom: 1px solid #fff; color: #000; } #navbar li li a:hover { background-color: #8db3ff; } #navbar li li ul { display:none; } #navbar li li:hover ul { display:block; left:150px; margin-top: -1.5em; } #navbar li li:hover li { float:right; } thanks for your help
  3. redfinger

    error handling

    please why is this php error handling not working <?phpif(!file_exists("dem.txt")){die("file not found")}else{$file=fopen("dem.txt","r");}?> its suppose to echo file not found.thanks
  4. redfinger

    Newbie Help!

    okay.l got that code from w3schools.com php section for uploding file.how can their code be wrong and if it is that means am..jeez..so pls wot should the code be
  5. redfinger

    Newbie Help!

    please why is this code not working <!DOCTYPE html><html><head> </head> <body><?php$allowedExts=array("gif","jpg","png","jpeg");$extension = end(explode(".",$_FILES["file"]["name"]));if ((( $_FILES["file"]["type"]=="image/png")|| ($_FILES["file"]["type"]=="image/jpg")|| ($_FILES["file"]["type"]=="image/jpeg")|| ($_FILES["file"]["type"]=="image/gif")|| ($_FILES["file"]["type"]=="image/x-png")|| ($_FILES["file"]["type"]=="image/pjpeg")&& ($_FILES["file"]["size"] < 20000)&& in_array ($extension, $allowedExts)) {if ($_FILES["file"]["error"] > 0){echo "error " . $_FILES["file"]["error"] . "<br>";}else{echo "Name " . $_FILES["file"]["name"] . "<br>";echo "Type " . $_FILES["file"]["type"] . "<br>";echo "Size " . ($_FILES["file"]["size"] /1024) . "<br>" ;echo "Stored in " . $_FILES["file"]["tmp_name"];}}else{echo "invalid file";} ?></body> </html> its giving this error Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\upload_script.php on line 19
  6. redfinger

    Newbie Help!1

    about #5 l was able to get the error.. php in w3schools is fun(moving on to cookies now) and great forum too.thanks guys-deirdre's dad
  7. redfinger

    Newbie Help!1

    am still battling with uploading files. it just wont work.this is the index<!DOCTYPE html><html><head><title>Brave Heart</title></head><body><form action="action.php" method="post" class="test1" enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file"><br><input type="submit" name="submit" value="upload file"></form></body></html> and the upload script<!DOCTYPE html><html><head><title>Backend</title> </head><body> <?phpif ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; }else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; }?></body></html> please help .thanks
  8. redfinger

    Newbie Help!1

    sorry this is the code <DOCTYPE html><html> <body> <?php$file=fopen("welcome.txt","r");?> </body </html>
  9. redfinger

    Newbie Help!1

    Hi all am new here and also new to php and programming in general.l was wondering if someone could help me understand why the fopen() function is not working.Thanks
×
×
  • Create New...