Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Everything posted by phpretard

  1. Definately ouptputting lots of thing before this, buit there is so much I would know where to begin correcting... What is output buffering and could it help?
  2. This should work... <style> #question{ float:left; width: 49%; } </style> <div id=question> Echo Response 1 </div> <div id=question> Echo Response 2 </div> <div id=question> Echo Response 3 </div>
  3. I am trying to dispaly a pdf doc and I keep getting the good ol' "Can't modify header..." I think I understand the problem in that any header modification should be done before the html output. When I take away Header( "Content-type: application/pdf"); all I get is, %PDF-1.5 %âãÏÓ 17 0 obj <> endobj xref 17 297 0000000016 00000 n 0000007055 00000 n 0000007164 00000 n 0000007637 00000 n 0000007670 00000 n 0000007997 00000 n 0000008559 00000 n 0000008818 00000 n 0000009104 ---- AND MUCH MORE Is there a meta tag that will cover any pdf display on every page? Is there a better way to display a PDF stored in my DB? $query = ("SELECT type,content FROM diagram where CNumber=$CNumber"); $result = MYSQL_QUERY($query); $data = MYSQL_RESULT($result,0,"content"); $type = MYSQL_RESULT($result,0,"type"); Header( "Content-type: application/pdf"); print $data; PLEASE LET ME KNOW IF THE QUETION ISN'T CLEAR...When I don't thoroughly understand the problem it is difficult to ask the question.
  4. What should it be? ps. Can I see you modular CMS system?
  5. I am trying to upload a pdf to my DB. This is all I get... Warning: fread(): supplied argument is not a valid stream resource //HERE'S THE FORM <form method="POST" action="process.php" enctype="multipart/form-data" style="width: 200"> Doc Name: <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="256000"> File to upload: <input type="file" name="form_data" size="40"><br> <input type="submit" name="submit" value="submit"> </form> //HERE'S THE UPLOAD SCRIPT $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); $result=MYSQL_QUERY("INSERT INTO members (description, data,filename,filesize,filetype, date) VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type', '$date')"); $id= mysql_insert_id(); print "<p>File ID: <b>$id</b><br>"; print "<p>File Name: <b>$form_data_name</b><br>"; print "<p>File Subject: <b>$Subject</b><p>"; print "<p>File Size: <b>$form_data_size</b><br>"; print "<p>File Type: <b>$form_data_type</b><p>"; Any help tonight please??
  6. Thank you for the quick response!!!
  7. I would like to show all content that begins with the letter W. $result = mysql_query("SELECT --a row-- FROM --a table-- --but only the information that starts with W--"); any thoughts?
  8. Dude...have no idea what I'm reading there...it looks impressive though. Thank you. I want to display random ads down one side of a site I'm working on. There are plenty of unique rows I can select. Once selected, I need them to display randomly (not asc or desc). I can do it javascript, but prefer php. -Anthony
  9. Is there a code to SELECT * FROM a table and ORDER by a row, but randomly select the order? -Thank you
  10. I entered the phone numbers the same way. Why do some have "?"?
  11. rofl90, $url is pulled from the database. The value is something like "www.phpfreaks.com". So it echos -http://www.phpfreaks.com-. Can you suggest a better way? I am constantly learning. Thank you, Anthony oh yeah...I have no clue what voip or skyoe is.
  12. Add it to a different database just for you. After review move it to the main and delete it. No good?
  13. I don't understand why the phone numbers echo with a ? at the end. (only some of them) The database has the right number. (850) 697-4576? <--why <? $result = mysql_query("SELECT * FROM maps WHERE city='$page'"); while($row = mysql_fetch_array($result)) { $company=$row['company']; $phone=$row['phone']; $url=$row['url']; $street1=$row['street1']; $city1=$row['city1']; $zip=$row['zip']; $id=$row['id']; echo" <p class=\"sidebar-title-noshade\"><a target=_blank href=\"http://$url\">$company</a> <div class=\"sidebar-txtbox-noshade\"> <table border=0 width=100% id=table1 cellspacing=0 cellpadding=0> <tr> <td> $phone </td> </tr> <tr> <td> $street1 <br> $city1, FL $zip </td> </tr> </table> </div> "; } ?>
  14. Please let me know if the question is unclear.
  15. How do I post the array of information? $_POST['name[$i]'] <<--This what I want to happen. All works of course except the updating part. The "UPDATE" line is wrong. <?php include ('connect.php'); $sql="SELECT * FROM links"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <table width="500" border="0" cellspacing="1" cellpadding="0"> <form name="form1" method="post" action="test.php"> <tr> <td> <table width="500" border="0" cellspacing="1" cellpadding="0"> <tr> <td align="center"><strong>Id</strong></td> <td align="center"><strong>Name</strong></td> <td align="center"><strong>url</strong></td> <td align="center"><strong>sort</strong></td> </tr> <?php while($rows=mysql_fetch_array($result)){ ?> <tr> <td align="center"><? $id[]=$rows['id']; ?><? echo $rows['id']; ?></td> <td align="center"><input name="name[]" type="text" id="name" value="<? echo $rows['name']; ?>"></td> <td align="center"><input name="url[]" type="text" id="url" value="<? echo $rows['url']; ?>"></td> <td align="center"><input name="sort[]" type="text" id="sort" value="<? echo $rows['sort']; ?>"></td> </tr> <?php } ?> <tr> <td colspan="4" align="center"><input type="submit" name="Submit" value="Submit"></td> </tr> </table> </td> </tr> </form> </table> <?php if(isset($_POST['Submit'])){ for($i=0;$i<$count;$i++){ $sql1="UPDATE links SET name='$name[$i]', url='$url[$i]', sort='$sort[$i]' WHERE id='$id[$i]'"; $result1=mysql_query($sql1); } } if($result1){ echo "Worky"; } mysql_close(); ?>
  16. It worked great but what's the differnece between ' and " ? (if you don't mind sharing)
  17. How can I make this statement work? The link =<a href='index.php?page=contact'>Link</a> $_GET['page'] include (folder/$page.php'); The above doesn't work. Any help? -Anthony
  18. Thank you!!! Now I get to hunting that Waskely Wobot. HEHEHEHEH
  19. I have no idea what that code reads but I am going to use it. Thank you!!
  20. I am trying to catch that waskaly googlebot crawling my site. Evidently they have lots of IP addresses and whois says the range is 66.249.64.0 - 66.249.95.255. Please help me with the code below. <? $ip=$_SERVER['REMOTE_ADDR']; if($ip=='RANGE OF IPS'){ echo "Caught ya"; ?> } Thank you. -Anthony
  21. Thank you for the code help and especially the reason why!
×
×
  • 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.