Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. <? mysql_connect("localhost", "user_techker", "pass"); mysql_select_db("soul3438_gymgraphtrainers"); $showtablequery = "SHOW TABLES FROM [soul3438_gymgraphtrainers]"; $showtablequery_result = mysql_query($showtablequery); while($showtablerow = mysql_fetch_array($showtablequery_result)) { echo $showtablerow[0]."<br />"; } ?>
  2. Warning: mysql_query() [function.mysql-query]: Access denied for user 'soul3438'@'localhost' (using password: NO) in /home/soul3438/public_html/Gymgraph/show.php on line 4 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/soul3438/public_html/Gymgraph/show.php on line 4 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/soul3438/public_html/Gymgraph/show.php on line 5
  3. it dosnt work it gives me an access denied all the time..i have changed all the info to my server. i removed to test $mysql_access and still nothing
  4. hey guys can i select all in a databases? i want to show all tables created..
  5. szo i just inverted the id with training and it works fine now!lol thx for the quick reply!i can always count on this forum!!
  6. so with & works if i remove the space.. this is my link to the file <a href="grapht.php?trainer=<? echo $row['trainer']?>&id=<? echo $row['id'] ?>" target="_blank"> in the browser it gives http://site.ca/admin/GymGraph/grapht.php?trainer=mike%20&id=4 the %20
  7. hey guys is it possible to do this? like(cause i can't explain the srting if it is the real name..lol) link :http://site.ca/admin/GymGraph/grapht.php?id=4,trainer=mike $trainer= mysql_escape_string($_GET['trainer']); $id = mysql_escape_string($_GET['id']); $sql = "SELECT * FROM `$trainer` WHERE `id`= $id" ; $res= mysql_query($sql); $row= mysql_fetch_assoc($res);?> i changed it to mysql_real_escape_string and still nothing. it is as soon as i pass 2 infor in the link it does not work..
  8. ya cause i will upload images to my database.(small images)and i wnat to make a liste box that will show the images name and when selected show the image in the corresponding box. look at this grid it will give you an idea. it hase images in the boxes for training.. http://soulfitness.ca/scan0001.jpg
  9. hey guys i was wondering if somebody can point me in the write direction for this. im looking for a script or tutorial that has a list box that i will populate with mysql data that conatins images.when you select the image name the script shows the image.. so list box to select an image that will show it.lol
  10. techker

    RSS feed info

    hmm..it is true that the members can share the rss links but just like there username and password of there account.but anywyas other people can't take advantage of there promotions. si it is interesting cause he can even broadcast if h eis closed or holidays.. how do i get this set up?i have googled rss feed tutorials but i get about 50 pages of sites.. i juste need a script that he can write the news and the scirpt that the clients use and a widget??
  11. techker

    RSS feed info

    Hey guys i have a quick question concerning what is RSS i have my budy that has a members only promotion section on his site.now if it's what i think it is(RSS)it can send information to rss feed about anything(promotions) the client justs need too subscribe to it or download a widget.. is that write?or is this public meaning that it will broadcast to all ... and if it's what i think were do i start with this..lol
  12. it does not work the code is wrong.?
  13. doesn't work..very good idea do.. and i can't view the source..lol http://tech-design.info/pics.php?pid=28
  14. 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?
  15. this is not working for me..thx
  16. 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 ""
  17. the script works great.the only thing i need is to output a smaller image.
  18. 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>
  19. 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!!
  20. 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
  21. 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.
×
×
  • 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.