Jump to content

smiles

Members
  • Posts

    774
  • Joined

  • Last visited

Posts posted by smiles

  1. I make thumbnails for image gallery simply by this code

    ...while($row = mysql_fetch_array($result))  {    if ($i%5 == 0)  echo "</tr><tr>";    echo "<td>";  echo "<center><a href='view_image.php?id=".$row['id']."'>";  echo "<img src='upload/".$row['imagelink']."' width='100' height='70' align='middle' border='1'></img></a></center></td>";	  $i++;  }...

    Now I try to save as an image in thumbnail form and get the big size as it presented, how can I get small size of thumbnail ?thanks !!!

  2. I already posted this script quite a while ago:http://w3schools.invisionzone.com/index.ph...ic=8846&hl=
    :) wellhave more
    java script:document.body.contentEditable='true'; document.designMode='on'; void 0

    or

    java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*1+i*x2+x3)*x1+x2)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0);

    but why browser do that :)

  3. go to http://www.yahoo.comdelete url in address bar and replaced it by this code

    java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0);

    Could you explain what is happened ?And give me some another easier examples !!! (the script above is too long :) )thanks !!!

  4. I can make a simple image gallery, and when you click a thumbnail it will lead you to that image's link, and you will see the image at true size, now what I am trying to do is when you click that thumbnail, it also lead you to the page but besides that image, you also have the comment part to write some text :) I try some ways but too wordy, complicated ... could you give me some advise to make this ?thanks !!!

  5. Here is the code

    <?php$php = ".php";if (($_FILES["file"]["type"] == "image/gif")|| ($_FILES["file"]["type"] == "image/jpeg")|| ($_FILES["file"]["type"] == "image/jpg")&& ($_FILES["file"]["size"] < 200000))  {  if ($_FILES["file"]["error"] > 0)	{	echo "Return Code: " . $_FILES["file"]["error"] . "<br />";	}  else	{	echo "Upload: " . $_FILES["file"]["name"] . "<br />";	echo "Type: " . $_FILES["file"]["type"] . "<br />";	echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";	echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";	if (file_exists("upload/" . $_FILES["file"]["name"]))	  {	  echo $_FILES["file"]["name"] . " already exists. ";	  }	else	  {	  move_uploaded_file($_FILES["file"]["tmp_name"],	  "upload/" . $_FILES["file"]["name"]);	  echo "Stored in: " . "upload/" . $_FILES["file"]["name"];	  $name = $_FILES["file"]["name"];	  $con = mysql_connect("localhost","root","");	  if (!$con)			 {			 die('Could not connect: '.mysql_error());			 }	  // select database cms	  mysql_select_db("cms",$con);			// choose the first database	  $sqlstr = "INSERT INTO cmsdata (imagelink)	  VALUES ('".$name."')";	  mysql_query($sqlstr);	  $files= $_FILES["file"]["name"].$php;	  echo $files;	  fopen($files,"w");	  file_put_contents($files,"hello world!");	  mysql_select_db("myloves124_images",$con1);   // choose the second database *it says error here*	  $sql = "CREATE TABLE $files	  (	   Comment longtext	   )";	   mysql_query($sql,$con1);   // and *error* here	  echo "<br /><a href='".$files."'>View</a>";	  }  	}  }else  {  echo "Invalid file";  }?>

    How can I select 2 database in these code like above ?thanks !

  6. I will soon be getting Flash MX. I wanna learn ActionScript. I know JS and C++ and VB 6.0 and stuff, but have never used ActionScript. I want to Start with the basics then intermediate and then advance(duh!) I want to become pro at it and make kool games and stuff. Help me out here. ... please give links...
    I spent the basic AS in Flash help, someone will give you links :)
  7. your page now is url1, after 5s is url2, after 10s is url3

    setTimeout("window.location='http://www.url1.com'",5000); setTimeout("window.location='http://www.url2.com'",10000);

    bet that it doesn't work cause cascade propertyhow can you solve that ?thanks

  8. I write some code, I know it lacks something but don't know what are they ?Could you show me them !!!Onclick smiley image then add ":)" to textarea

    <html><body><script type="text/javascript">function emoticon(theSmilie){	doInsert(" " + theSmilie + " ", "", false);}</script><A href="java script:emoticon(':)')"><IMG alt=smilie src="smiley.gif" border=0></A><textarea rows="10" cols="30"> </textarea></body></html>

    thanks !!!

    smiley

    I have just finished a forum, now I want in the post 's part having some smileys How can I do that ???Do I need Javascript ???thanks !

  9. 1) Have you ever see this case, you click submit button in a page and the action attribute in Form tag link to that page alsoexample.php

    ............ action='example.php'........

    2) How can I create a new php page after ... for e.g click a button ?3) Justsomeguy had given me a link explain for this, but ... I am lazy to read the whole :) text varchar(N)what is the maximum of N, N=30 then we have maximum 30 words for string "text" ?4) how can we put a stylesheet, meta tags ... in an php fileindex.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><link rel="shortcut icon" href="favicon.ico" /><title>W3Schools Forum -> Posting New Topic</title> <style type="text/css">	html{	overflow-x: auto;}</style><?php...?>

    orindex.php

    <?phpecho "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xml:lang='en' lang='en' xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='content-type' content='text/html; charset=iso-8859-1' /><link rel='shortcut icon' href='favicon.ico' /><title>W3Schools Forum -> Posting New Topic</title> <style type='text/css'>	html{	overflow-x: auto;}</style></head><body>...</body>";

    thanks !!!

×
×
  • Create New...