Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Everything posted by phpretard

  1. When I insert this it inserts --- N; Does anyone know why it inserts that as opposed to the right stuff. Worthless code below: $url=serialize($_POST['url']); mysql_query("INSERT INTO secure_links1 (id, name, url, access)VALUES('', 'name', '$url', 'access')"); <input type='checkbox' id='url[]' value='$url' />
  2. Now my eyes hurt. please tell me what is wrong with this. <?php if (isset($_POST['submit'])){ $password = $_POST['password']; // Replace with whatever their input is include "connect_file" $query = "SELECT * FROM draft WHERE password = '$password'"; $result = mysql_query($query) or die(mysql_error()); if(mysql_num_rows($result) > 0) { print "Yes"; } } else { echo " <form action=this_page method=post><p align=center>Enter Password<br> <input name=password type=password size=25 maxlength=10> <input name=submit value=' Next >> ' type=submit><form>"; } ?> You were right about the Field. -Anthony
  3. Could you give me a shove in the right direction to accomplish this?
  4. I have many passwords in my database that I would prefer not to type in there. I can echo all the passwords withour any trouble but geting it to fit inside of the array is my problem. Is this more clear?
  5. It works if I type passwords in like this ('password1', 'password2') I can't seem to convert this to a WHILE statement. I have been trying for some time now. Just a little more help please? -Anthony
  6. //right if (isset($_POST["password"]) && ($_POST["password"]=="$password")) //wrong or nothing if (isset($_POST['password']) || $password == "") { Do you need more thasn this?? I have lots
  7. I haven't worked with arrays that much...I type alot! in this simple script I cant figure out after much reading how to accept multiple passwords. $password =I need several passwords here It works fine until I start adding multiple passwords. Any help would be appriciated.
  8. For some reason it works with what looks like the same code. Thank you for your help and advise!! -Anthony
  9. I think the problem with this query is the space between The and President. Is there any way to leave a space there an it still work? $position="The President"; mysql_query("SELECT * FROM links WHERE $position='1' ");
  10. That worked but why don't you need the single quotes. Typically you do right?
  11. I am trying to display links to people that login. Each user is assigned a class number(1 thru 7). The links also have a class number. No prblem there. The problem is a class 7 needs to see all links asigned a class 7 or less. Here's the code my little brain came up with... $result = mysql_query("SELECT * FROM links WHERE class='$?????? < = $??????' "); It dosn't work...am I even close to getting this right?
  12. I thought it worked but it didn't. Can you take another shot?
  13. Thank you very much!! Maybe you do know...and you didn't that you knew.
  14. I am echoing some javascript just fine but I need 1 part of the script to echo 1 then 2 then 3 and so on. while($row = mysql_fetch_array($result)) { echo" var marker1= new GMarker(new GLatLng($lon,$lat), markerOptions); map.addOverlay(marker1); GEvent.addListener(marker1, 'click', function() { marker1.openInfoWindowHtml(WINDOW_HTML1);}); "; } The only change I need is marker1 and then marker2 ... according to the number of rows in the database. (there are 2 instances of "marker1") Could you help? -Anthony
  15. I am sure you know this prints: Array ( [q] => east polk llc [rls] => com.microsoft:* [ie] => UTF-8 [oe] => UTF-8 [startIndex] => [startPage] => 1 ) How can I isolate "east polk llc"?
  16. $_SERVER['HTTP_REFERER'] reads http://www.google.com/search?q=Can+I+Pull+This+Info&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1 When someone hits my site from google. Yahoo has a "p=". Is it possible to capture just the "q=" and/or the "p=" value.
  17. You're right. Again thank you for the quick response
  18. THANK YOU FOR RESPONDING SO QUICKLY! I can tell it is shows all of the pictures now BUT... The picture is in binary code ???
  19. I dont' know if you can use this but it works. <?php if(isset($_POST['submit'])) echo"<form><input type=submit disabled></form>"; else echo"<form method=post><input name=submit type=submit></form>"; ?>
  20. This seems simple enough to me BUT...there are 10 images in the database and this will only display 1 Does anyone know why? Oh please help me...(my eyeballs hurt) <?php include "connect.php"; $result = mysql_query("SELECT * FROM pictures"); while($row = mysql_fetch_array($result)) { $data = $row[bin_data]; $type = $row['file_type']; echo $data; } ?>
  21. Do you need to see more code to help me figure out why this will not allow a word || a wordpad document to be uploaded? ($_FILES["form_data"]["type"] == "application/pdf") || ($_FILES["form_data"]["type"] == "application/doc") || ($_FILES["form_data"]["type"] == "application/rtf") (it does allow PDF)
  22. round('3.5558', 2); works great on a whole number. What if I want to round "0.5241234" to "0.052"? Any thoughts? -Anthony
×
×
  • 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.