Jump to content

robert_gsfame

Members
  • Posts

    876
  • Joined

  • Last visited

Everything posted by robert_gsfame

  1. for paging it works, but for block it didn't work in IE 6.0...i don't think IE 6.0 support this
  2. let say i have <a href="#">Forum</a> and i wish to have it like Forum ---> php mysql css html it's like another box appeared once text "forum" hover, how do i create this in CSS?? thx
  3. I don't know why, but i always try to use CSS and only run well in MOZILLA not in IE This is my CSS .borderblock{display:block} .paging{border-style:solid; border-width:1px; border-color:#000000;} This is my HTML code <a href=# class=borderblock>Click me</a> ======>i don't find any block in IE 6.0 <span class=paging>1</span> <span class=paging>2</span> <span class=paging>3</span> ===============================>i have those numbers bordered but top border and bottom border missing What is actually happen with IE 6.0 ????can anyone modify the code or may be something wrong with the code?? THX!
  4. thanks everyone, i got some whitespace in my config
  5. this is my config <? $host="localhost"; $username="myusername"; $password="mypassword"; $db_name="mydatabase"; mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB");?> is there something wrong in the config??
  6. <?php session_start(); ?> <?php require_once('config.php');?> <?php $id=$_GET['id']; $query2="SELECT * FROM table1 WHERE corp_email='$session' AND id='$id'"; $sql2=mysql_query($query2); $array2=mysql_fetch_array($sql2); $fileName=$array2['attachment']; $mimeType = 'application/msword'; header('content-disposition: attachment; filename="' . $fileName . '"'); header('content-type: ' . $mimeType); header('content-length: ' . filesize("upload/{$fileName}")); readfile("upload/{$fileName}"); ?> no echo or print but still create the same error
  7. i am stil newbie and not sure which part is wrong :'(
  8. <?php session_start(); ?> <?php require_once('config.php'); $session=$_SESSION['MM_Username']; $id=$_GET['id']; if(empty($session)){ print "<script>"; print "self.location='index.php'"; print "</script>";}else $query=sprintf("SELECT * FROM table1 WHERE email='%s'", mysql_real_escape_string($session)); $sql=mysql_query($query); $num=mysql_num_rows($sql); if(empty($num)){print "<script>"; print "self.location='index.php'"; print "</script>"; session_destroy();}else{ $query1=sprintf("SELECT * FROM table2 WHERE corp_email='%s' AND id='%d'", mysql_real_escape_string($session), mysql_real_escape_string($id)); $sql1=mysql_query($query1); $num1=mysql_num_rows($sql1); if(empty($num1)){print "<script>"; print "self.location='error.php'"; print "</script>";}else{ $query2=sprintf("SELECT * FROM table2 WHERE corp_email='%s' AND id='%d'", mysql_real_escape_string($session), mysql_real_escape_string($id)); $sql2=mysql_query($query2); $array2=mysql_fetch_array($sql2); $fileName=$array2['attachment']; $mimeType = 'application/msword'; header('content-disposition: attachment; filename="' . $fileName . '"'); LINE 39 header('content-type: ' . $mimeType); LINE 40 header('content-length: ' . filesize("upload/{$fileName}")); LINE 41 readfile("upload/{$fileName}");}} ?> AND I GOT THIS MESSAGE Warning: Cannot modify header information - headers already sent by xxxxxxxxx on line 39 Warning: Cannot modify header information - headers already sent by xxxxxxxxx on line 40 Warning: Cannot modify header information - headers already sent by xxxxxxxxx on line 41 By the way, when i tried on my local server no problem occured but then i upload the file into my domain cpanel and this problem occur Can anyone help me??
  9. THat's Right you haven't get the value from the url $_GET['id']
  10. if($_GET['delete']=="delete"){ check this one
  11. DELETE FROM forum_question WHERE id='$id' you forgot to put single quote is that what you need??
  12. i allow users to upload their document * doc format and stored inside folder and i've put some limitation that document other than * doc format cannot be uploaded using this script $filetype=$_FILES['file']['type']; if($filetype!='application/msword'){ echo "doc* format only";}else{ COPY FILES INTO FOLDER but the problem is that when i try to upload the * doc format file, "doc* format only" appear and file not copied into the folder This just happened in MOZILLA browser ! but it works well in IE 6.0 What is wrong with the code, can anyone give some solution regarding this problem??
  13. i don't have any idea, could you please help me
  14. i tried using IE and it works but when running on mozilla didn't work I've tried the code before no problem occured for both browsers but when i try to run the script today, it didnt run in mozilla What's wrong
  15. $filename=$_FILES['file']['name']; $filetype=$_FILES['file']['type']; $filesize=$_FILES['file']['size']; if(empty($filename)){ $warning="No file uploaded</font>";}else if((!empty($filename))&&($filetype!='application/doc')&&($filetype!='application/msword')){ $warning="Word document only!"; }else if((!empty($filename))&&($filesize>60000)){ $warning="File size exceeds maximum"; }else{ echo $fileName;} But i always stuck with the second part as i've uploaded the doc format file and i always got the warning "Word document only" Which part is wrong??thx
  16. THX rajivgonsalves !!! NICE CODE!!!! quote really makes different!! THX so much !!
  17. okay i got the problem for showing the image as i can str_replace(" ","%20"); but then i tried to use it for the downloading and NOT WORKING there is no problem when storing the record into the table as it has been stored using the name of the file itself although it contains spaces! The problem occurs during the downloading as any character after space cannot be read!
  18. im trying both downloading and showing the image using <img src> below is the code for downloading: assume myimage table contains the file $fileName=$array['myimage']; $mimeType = 'image/jpeg'; header('content-disposition: attachment; filename=' . $fileName); header('content-type: ' . $mimeType); header('content-length: ' . filesize("folder/{$fileName}")); readfile("folder/{$fileName}"); besides i also tried to show the image using <img src=folder/$fileName> but also didn't appear
  19. user has uploaded their document named = "my document.doc" and stored inside the database once downloaded, i get this "my.doc" and ignoring the document as there is some little space between my and document. Can i still get "my document.doc"?? i've tried nl2br but still didn't work
  20. thanks i got it now! use document.getElementbyId
  21. i don't want to use $_GET or $_POST.. can i still doing that?maybe in javascript
  22. I have <input type="text" name="message"> <a href=page2.php>click here</a> Can i parse the value whatever written in the textbox on url like this page2.php?message=blablabla using onclick
  23. <?php $fileName = 'mypic.jpg'; $mimeType = 'image/jpeg'; header('content-disposition: attachment; filename=' . $fileName); header('content-type: ' . $mimeType); header('content-length: ' . filesize($fileName)); readfile($fileName); ?> i tried to download the file called "mypic.jpg" which is stored inside folder called "myfolder"... i use the code written above, n i can download the file but once open nothing was shown up!.... What's wrong?? path?? can anyone help me with this code??
×
×
  • 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.