Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. doesn't work..very good idea do.. and i can't view the source..lol http://tech-design.info/pics.php?pid=28
  2. maybe it does work but i can't seem to figure it out in my script.. if it try ".144." it gives me an error and the other nothing?
  3. this is not working for me..thx
  4. the image is ain a variable $imcolumn .= "<tr><td><img src=?pid=$row[pid] width=144 ><br>"; <b><?= $imcolumn ?></table></center> it is that im using? but i will try with the ""
  5. the script works great.the only thing i need is to output a smaller image.
  6. hey guys my script calls a picture in my database.they only thing is i need to resize it but it does not seem to work? pics.php?pid=3 // Connect to database $errmsg = ""; if (! @mysql_connect("localhost","here","there")) { $errmsg = "Cannot connect to database"; } @mysql_select_db("techker_here"); // Find out about images to display $pid = mysql_escape_string($_GET['pid']); if ($_GET['pid']) { $whereclause = "where pid = \"$pid". $_GET['pid']. "$pid\""; $gotten = @mysql_query("select * from pix order by pid desc "); while ($row = @mysql_fetch_assoc($gotten)) { $imcolumn .= "<tr><td><img src=?pid=$row[pid] width=144 ><br>"; $imcolumn .= htmlspecialchars($row[title])."</td></tr>"; $nim++; } if (! $nim) $imcolumn = "<tr><td>No matching images</td></tr>"; } else { $imcolumn .= "<tr><td>Images will appear here</td></tr>"; } // If this is the image request, send out the image if ($_GET['pid']) { $gotten = @mysql_query("select * from pix where pid = $_GET[pid]"); $row = mysql_fetch_assoc($gotten); $bytes = $row[imgdata]; header("Content-type: image/jpeg"); print $bytes; exit (); } ?> <html><head> <title>Selection of up to 3 images from a database</title> <body bgcolor=white><h2> </h2> <font color=red><?= $errmsg ?></font> <center><table border=1> <b><?= $imcolumn ?></table></center> <hr> </body> </html>
  7. hey guys i found this script to insert images in a mysql database. works good for inserting but getting the image is wrong..i know about were it is wrong but i can't see to correct it?? <?php // Connect to database $errmsg = ""; if (! @mysql_connect("localhost","techker","pass")) { $errmsg = "Cannot connect to database"; } @mysql_select_db("techker_DB"); // First run ONLY - need to create table by uncommenting this // Or with silent @ we can let it fail every sunsequent time ;-) $q = <<<CREATE create table pix ( pid int primary key not null auto_increment, title text, imgdata longblob) CREATE; @mysql_query($q); // Insert any new image into database if ($_REQUEST[completed] == 1) { // Need to add - check for large upload. Otherwise the code // will just duplicate old file ;-) // ALSO - note that latest.img must be public write and in a // live appliaction should be in another (safe!) directory. move_uploaded_file($_FILES['imagefile']['tmp_name'],"latest.img"); $instr = fopen("latest.img","rb"); $image = addslashes(fread($instr,filesize("latest.img"))); if (strlen($instr) < 149000) { mysql_query ("insert into pix (title, imgdata) values (\"". $_REQUEST[whatsit]. "\", \"". $image. "\")"); } else { $errmsg = "Too large!"; } } // Find out about latest image $gotten = @mysql_query("select * from pix order by pid desc limit 1"); if ($row = @mysql_fetch_assoc($gotten)) { $title = htmlspecialchars($row[title]); $bytes = $row[imgdata]; } else { $errmsg = "There is no image in the database yet"; $title = "no database image available"; // Put up a picture of our training centre $instr = fopen("../wellimg/ctco.jpg","rb"); $bytes = fread($instr,filesize("../wellimg/ctco.jpg")); } // If this is the image request, send out the image if ($_REQUEST[gim] == 1) { header("Content-type: image/jpeg"); print $bytes; exit (); } ?> <html><head> <title>Upload an image to a database</title> <body bgcolor=white><h2>Here's the latest picture</h2> <font color=red><?= $errmsg ?></font> <center><img src= width=144><br> <b><?= $title ?></center> <hr> <h2>Please upload a new picture and title</h2> <form enctype=multipart/form-data method=post> <input type=hidden name=MAX_FILE_SIZE value=150000> <input type=hidden name=completed value=1> Please choose an image to upload: <input type=file name=imagefile><br> Please enter the title of that picture: <input name=whatsit><br> then: <input type=submit></form><br> <hr> </body> </html> the error <html><head> <title>Upload an image to a database</title> <body bgcolor=white><h2>Here's the latest picture</h2> <font color=red><?= $errmsg ?></font> <center><img src= width=144><br> <b><?= $title ?></center> i think there is missing info on the image it self? img src= HERE width=144 thanks!!
  8. well i already have an id from the mysql.i will use that..cause my buddy wanted higher numbers..or 000001 i will check out the site thx
  9. lol it maybe is for you but i just need a quick tutorial to beggin.i have tryed google(lamez) and it is all pre made stuff.and i dont know the php term to use.
  10. hey guys i need to find a script or tutorial to auto generate a membership id and barcode when i add a new client to my database? any budy know were i can find this??
  11. interesting.. i think i will stick to the web based application.all he has to do is scan the card . i can always transform his pc to a server with wamp.. still looking in to this..thx guys!
  12. i guess i will keep on googling..
  13. for shure ther is lots but there should be an application to work them? i know vb and access..
  14. i know but you still need to make it? inless there is something else out there to make applications then vb and access?please let me know.thx
  15. techker

    clock

    cool for that.but does any body now how to remove the date?
  16. i know but i have a hard time with applications..lol the only app i have an ok time with is access... but then again it uses asp and i use mysql on my servers..
  17. hey guys i was wondering if any body has tryed doing a web bassed application with a bar code scanner? see im doing an web site for my boddy that is opening a gym and he wants an application that could contain the members information and that when they come in they need to scan there membership card. see the thing is ,is that the cursor needs to be always in the box so when it scans a card it retreives the members info.but if the guy is doing something else thats what messes me up?? im a clear?lol
  18. techker

    clock

    hey guys i found this code on the net that shows the ctime and the date.. now is it possible to remove the date?or change it to french.. <Body> <Form Name="clock"> <Input Name="display" Size="40" Style="Font-Family:Comic Sans MS;Font-Size:24pt;Color:Blue;Font-Weight:700;Border:Solid 0px; Back-Ground:Transparent"> </Form> </Body> <Script Language="JavaScript"> <!--// function clock() { var now = new Date(); document.clock.display.value = now.toLocaleString(); timerID = setTimeout('clock()', 1000); } window.onLoad = clock(); //--> </Script>
  19. hey guys i have a usermanagement script that i made and my insert users does not incript the password in the database? is it in the phpmyadmin that i set something to incript it or it's in my script?
  20. $delRT = "SELECT CURRENT_DATE FROM `members` WHERE `date_rendezvous` LIMIT 0 , 30 "; $fileLIST=mysql_query($delRT); <?php while ($info=mysql_fetch_array($fileLIST)) {?> <? echo $info['date_rendezvous'] ?></td> <? } ?>
  21. hey guys i found this with google.works fine in my phpmyadmin $sql = 'EXPLAIN SELECT CURRENT_DATE FROM `members` WHERE `date_rendezvous`'; but when i put it in my page it does not echo anything? <? echo $info['date_rendezvous'] ?>
  22. techker

    hide id

    nice !! so this ! means like do not show?
  23. techker

    hide id

    hey guys i have this databse that contains a admin user. now when i extract all the id's from the database it always shows me that admin.. is there a way in my query to omit id 0?
×
×
  • 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.