Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Clicking Pictures To Appear In The Textarea.


I am trying to do a function where you click on the images and these are entered into the textarea. Exactly as if i was clicking on this above and it enters the code for the picture into this textarea.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Clicking Text
is there away to click on any text on a page and have it add that text to a text box? so if i click on the word (phpfreaks) it will add it to a text box.

Alert By Clicking On A Link
Is it possible to set a javascript alert before executing a php script when a hyperlink is clicked. i.e. user clicks hyperlink "delete" to execute delete.php?task=del&id=2

Sending Form Data Without Actually Clicking?
Is this possibe? Say you wanted to test that a form was working correctly, every so often you could with a cronjob run a script to process the form for you.

Is There A Way To Pass A Form By Clicking On A Link
I was wondering if it's possible for me to create a form where the user can submit the form by clicking on a hyperlink instead of clicking on a button to pass the data. Is this possible?

Attach Files By Clicking The Image
How to attach files by using the image...by clicking the image it will come a pop up message (the attachment page with browser button)...and i can attach the files..

Changing Variables By Clicking Text Link?
I have a page that I need to change variabels with, based on what link you click on the page.

Hitting Enter On A Form Instead Of Clicking The Button
I'm getting incorrect response when hitting the enter key instead of
actually clicking the button on a form. It activates but the post data
[value='Update'] isn't being sent I think. The php generated page
flickers & reloads but doesn't perform the update.

This is php generated, I'm just pasting the page source (reformatted &
extra junk removed and I think they are now identical), and it's running
on my localhost apache server for testing so maybe there's something
funny with my setup. Crossposted to html & php groups.

Must click button (no enter):

<form action='?SC=cart.php' method='POST'>
<tr>
<td>
<input type='hidden' name='item' value=&#55618;&#57133;'>name
</td>
<td>
<input type='submit' name='buy' value='Update'>
</td>
<td>
<input type='text' name='item_qty' size=&#391;' value=&#392;'>
</td>
</tr>
</form>

Enter or click works fine:

<form action='?SC=cart.php' method='POST'>
<tr>
<td>
<input type='hidden' name='item' value=&#55619;&#56572;'>name
</td>
<td>
<input type='submit' name='buy' value='Update'>
</td>
<td>
<input type='text' name='item_qty' size=&#391;' value=&#392;'>
</td>
</tr>
</form>

Here they are without me fixing up the formatting:

Must click button (no enter):

<form action='?SC=cart.php' method='POST'><tr>
<td><input type='hidden' name='item' value=&#55619;&#56572;'>Adiantum jordanii / -
1 gal</td>
<td><input type='submit' name='buy' value='Update'></td>
<td><input type='text' name='item_qty' size=&#391;' value=&#391;'></td>
<td>$&nbsp;9.00 </td><td>$&nbsp;9.00 </td><td>0%</td>
<td>10%</td>
</tr></form>

Enter or click works fine:

<form action='?SC=cart.php' method='POST'><tr>
<td><input type='hidden' name='item' value=&#55618;&#57133;'>Adiantum jordanii / -
1 gal</td>
<td><input type='submit' name='buy' value='Update'></td>
<td><input type='text' name='item_qty' size=&#391;' value=&#392;'></td>
<td>$&nbsp;10.00 </td><td>$&nbsp;20.00 </td></tr></form>
<tr><th colspan=&#394;' align='right'>Tax:</td><td>$
1.70</td><td>&nbsp;</td></tr>
<tr><th colspan=&#394;' align='right'>Delivery:</td><td>$
0.00</td><td>&nbsp;</td></tr>
<tr><th colspan=&#394;' align='right'>Order Total:</th><th>$&nbsp;21.70</th>
<th><form action='?SC=checkout.php' method='post'><input type='submit'
name='checkout' value='Checkout'></form>

Problem With HTTP_REFERER When Clicking On Refresh Button
In a simple webshop application I am trying to check that the "shopping
cart" only should be "filled" when you choose an article in "meerinfo.php"
and click on a link to "winkelwagen.php". It works fine in that sense that
when I would enter in the browser "www.mysite.php/winkelwagen?id=5"it will
be ignored.
However when I go from meerinfo.php to winkelwagen.php , the article is
added again and again to the shopping cart when I click on the refresh
button in Internet Explorer. Is there a way to avoid that?

This is the code in winkelwagen.php

if(!isset($_SESSION['artikelen'])) //initiate the array when the first
article is added to the shopping cart
{
$_SESSION['artikelen'] = array();
}
$waarvandaan = $_SERVER['HTTP_REFERER'];
if (strstr($waarvandaan, "meerinfo.php"))
{
$id = $_GET['id'];
$_SESSION['artikelen'][] = $id;
}

Validate Your Account By Clicking On A Link In The Email
i have a registration page and what  whant to do is make it so users have to validate an account by clicking on a link in the email like you see on most sites.

How To Call A Dll File By Clicking An Icon/image In A Webpage
how to call a dll file by clicking an icon/image in a webpage using php.

Moving A File To A Directory By Showing Clicking A Thumbnail
I would like to show a users uploaded files as a clikkable thumbnail which when pressed renames(moves the image into its new directory) I have gotten as far as making them appear as thumbs that link to large images, Code:

Clicking Browser's Back Button Shows An Empty Page
On my website www.lahabitacionroja.com developed using Php I am experiencing the following problem:

When a user with MS Explorer 5.0 or older clicks the back button on the browser it shows an empty page...
If you try with MS Explorer 6.0 this problem doesn't happen.

Does anybody why it happens and if there is any easy solution??

Is it a browser issue, an Apache issue....

How Do You Make The Contents Of A Text Box Remain, Even After Clicking Send, With Errors ?
How do you make the contents of a text box remain, even after clicking send, with errors?

At the moment, the visitor inputs a load of text into the comments box, but if they click send and there's errors in other fields on the page, the comments box goes blank and they have to start all over again ...

Pictures In A DB
I am working on a website where people register to
model for photogrpahers. As they register, I want
them added to a list of other models, which will be
stored in a DB, and retrieved with PHP. I would like
to create a <table> setting, and have PHP list out
their names in alphabetical order.

My question is this. Do I put the pictures into the
DB (MySQL), or keep them in a separate directory? I
would then use a foreach statement to build the
<table> sequence and the rest of the page.

MB/KB Of Pictures
I have an image gallery and want to have a php script that shows how much MB/KB of pictures have been served that day. I am guessing that you just read how much a certain directory has been accessed and count that.

Downloading Pictures
I'm trying to download a gif image from the web and save to my servers hard drive. But I can't seem to fetch it correctly. I'm trying with.

Uploading 2MB+ Pictures
I have a site that has a picture album. It is hosted and I believe the php.ini file is set at the default of 2MB limit per file.

With 5MP+ cameras out there many people have pictures that are over 2MB straight off the camera. As a convenience to the user, I would like to let them upload the pictures immediately after they pull them from the camera. I have the pictures resized to around 50k once they are on the server to conserve space and bandwidth.

Unfortunately, I can't even get the files over 2MB onto the server. As you know, many people are clueless about resizing their pictures and won't go to the trouble. I want them to be able to use my site. Does anyone have any good tricks to move 2MB+ files?

Including Pictures Via PHP
Is there any way of including a jpg or gif file through php without using the code below?

<?php
include("/images/$id.jpg");
?>

Pictures From XML File.
I've been able to parse the XML files used to update my database.

Now, I receive image in XML files, like this:

<PICTURES COUNT="3" CDATA="1">
<PIC NR="1"><![CDATA[/9j/4AAQSkZJ.....=]]></PIC>
<PIC NR="2"><![CDATA[/9j/4AAQSk.............></PIC>
<PIC NR="3"><![CDATA[/9j/4AAQSk.............></PIC>
</PICTURES>

How to save those 3 images in 3 jpg files ?

Pictures In MySQL
I am creating a code out of bits and pieces I found in somebody else's
code, so I am not entirely sure how it behaves.

<IMG SRC="picture.php?ID=1029&THUMB=yes">

picture.php:
<?
Header( "Content-type: image/jpg");
$linkID = mysql_connect("host", "user", "password");
mysql_select_db("database", $linkID);
if(isset($_GET['ID'])){$ID=$_GET['ID'];}else{$ID=0;}
$result=mysql_query("SELECT * FROM picture_base WHERE ID=$ID") or
die("Can't perform Query");
$row=mysql_fetch_object($result);
if(isset( $_GET['THUMB']){echo $row->THUMB}else{echo $row->IMG;}
?>
The script works and displays pictures properly so I am happy with it.
Its small and simple enough, my question is if not every site is
saving their pictures in databases there must be a reason why, yes?
And if I load picture.php?ID=1029&THUMB=yes as opposed to picture.php?
ID=1029, will the script still load through the full sized image (in
the IMG collum) and will that effect my traffic?

Random Pictures
i want to display random pictures every time a page is loaded, but i dont want the same ones shown again. so I setup a database and a 20 year unique id cookie and i log the id's of the pics shown in the db. now the problem is, that i use mt_rand to generate an id and show that picture.

if the id has already been shown, by querying the db, what is the best way to get another random number that isn't in the db? do i have to do some kind of loop and getting generating random numbers until one isn't in the db yet? this might take a while if the user has almost seen all of them, it might take a while to get a random number that isn't one of the others.

Uploading Pictures
I want to create a web site where the user uploads photos.

What is the proper way (I'm using php) to do this?

I want to make sure the user doesn't upload viruses instead of pictures.  Also want to be able to shape the pictures so that they are all the same size, no matter what size they are when the user uploads them.

Uploading Pictures
im trying to upload pictures but it does not record it in the database that a file has been attached for a particular bulletin.  Dont want to view it, just record that its been attached. Code:

Pictures In A News-site
I'm going to start a news-system. I planned the database, but I'm not sure how to place the images into a generated form.

The database (partial) is:

article_id int
author_id int
date date
title varchar (50)
body varchar --> here comes the html source
links, etc...

It is a good way to place the image path into the html (img src...) and store the images in a specified directory, or easier to place the binary file into the database (pgsql)??
what is better for the body, the article in a html file, and in the database only the link or the html source in the database.

Php Gallery For Pictures And Videos
I must create gallery (pictures and videos) in php The user must login to see only his personal files. There is any tool doing this....

Using Php Generated Pictures With HTML?
I am able to create images with the use of the GDLIB.
but I am not able to use these images together with HTML. I always get the
message "headers are already sent.

Pictures Into A MySQL Database
I need to put pictures in to a MySQL -database with PHP and also be able to view them on a web page with PHP.

Issue With Cache And Pictures
I have a problem with cached images...

The script first creates some pictures out of avariable source (every time
the script runs the pics are different):

$im = imagecreatefromjpeg($file);
imagejpeg($im2,"temp100.jpg",100);
imagejpeg($im2,"temp75.jpg",75);
imagejpeg($im2,"temp50.jpg",50);
imagejpeg($im2,"temp25.jpg",25);

then I show them using normal html img tags

<img src="temp100.jpg">

The problem is that the pictures are cached and the script/IE shows a
fautlhy version of the pictures.

I tried messing with the header as described in the php manual.

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

But this doesn't work... wrong pic-fileversion

Does anybody has a sollution?



Uploading Pictures In PHP/MySQL
Does anyone know of a good tutorial that works or some sample code that works for this function?

1. Load photo to a file folder on the server
2. Load photo name to the mysql database
3. Resize photo on upload to a specific size

I have found tutorials and sample code, but they don't work.

How To Thumbnail 1000s Of Pictures
I have a directory on my box with over 1000 pictures on. Now i wanna make a thumbnail of every picture,I started out just programming away, got all the names of the ".jpg" into an array and then looped throug while using the "ImageCopyResized" function

first i got a timeout from the server saying ot took more than 30 secs to execute my script, then i used the "set_time_limit" function! But it still stops after having made about 50 thumbnails, i can't figure out whats wrong!! does anybody have any experience with this kind of operations??

User Uploading Pictures
I have a web site I am developing, and have a question. I would like
members to be able to upload pictures.

Do you think they should be saved as individual files or should they be
put in an MySQL database? Which would you recommend, and do you have any
sample code for accomplishing this?

Access Pictures From MySQL.
I'm planning on letting my users add pictures to their pages using the browser upload method. My question is, which is better? adding the picture to the database? or storing them on a separte directory and add a link to the page? I also will be letting each user have quota on the disk space.

Upload And Resize 2 Pictures
how can I upload and resize 2 or  more pict in same time:

if($_FILES["picture"]["name"][1]) {
      $dest = "../photo_dir/".$document_id."_photo[1].jpg";
      copy($_FILES["picture"]["tmp_name"][1], $dest);
}

if($_FILES["picture"]["name"][2]) {
      $dest = "../photo_dir/".$document_id."_photo[2].jpg";
      copy($_FILES["picture"]["tmp_name"][2], $dest);
}

... but I want to these pictures been resized from original size (no matter what size) on upload to x= 100px y=100px - or other dimension.

Reading Pictures In A Folder
I'm trying to make a simple way to make a dynamic photo gallery function.  This is my idea:
First have a folder called Pics, in pics is a folder for images of different type (the criteria fun,events,nature) then in there I dump the images sorted by types in there with a basic numbering scheme of 01.jpg,02.jpg,03.jpg,04.jpg.  Anyone got any ideas on a way I can read all the pictures in the subfolders and view them without having to give a count of images?

How Does Uploading Pictures Work?
Like myspace how does it "upload" the images I got a form to give it a try but was wondering as I am using local host I want to test it by uploading to my own hard drive as such... but unfamiliar on 2 things...

1) where should it be stored in the htdocs directory precisely?

2) how do sites like myspace etc with hundreds of pictures on their server's know which image is related to which profile ?

Is it possible to test on local host? Or will i have to buy a real server firstly?

Load Multiple Pictures Into MySQL?
I'm trying to create a picture database for a site that I'm working on and I
would like to do the following:
- (main goal) Have a php script load an entire directory of photos into my
mysql database in one swoop.
- Display thumbnails on a general viewing page.
- allow for viewing individual pictures by clicking on the thumbnails.

<?php
error_reporting(E_ALL);
$id = $_REQUEST["iid"];
$link = mysql_connect("localhost", "root", "") or die("Could not connect:
" . mysql_error());

mysql_select_db("mysql") or die(mysql_error());
$sql = "SELECT b1 FROM t1 where id in (1,2,3)";

$result = mysql_query("$sql") or die("Invalid query: " . mysql_error());
header("Content-type: image/jpeg");

while ($row = mysql_fetch_array($result))
{
$fileContent = $row['b1'];

$im = imagecreatefromstring($fileContent);
$width = imagesx($im);
$height = imagesy($im);
$imgw = 50;
$imgh = $height / $width * $imgw;
$thumb = ImageCreate($imgw,$imgh);

ImageCopyResized($thumb,$im,0,0,0,0,$imgw,$imgh,Im ageSX($im),ImageSY($im));
ImagejpeG($thumb);

imagedestroy ($im);
imagedestroy ($thumb);
mysql_close ($link);
}
?>

It is only displaying one image.

Storing Pictures Generated Witn GD
I'm trying to make php store a picture (on the server) that have been resized by GD. The picture is downloaded from a browser. But I would like to store this file in different sizes. To save downloadtime and cpu-power I wish to do this only once while downloading the file to the server.I can resize files, but I'm unable to store them.

Read A Directory With 17'000 Pictures
I have the following problem with the simplified script bellow!
When I start this script the first time files (~17000) are read in the /camera25 directory in less then 5 sec. When I click again on the same camera button ( second from the left), or reload button on the browser, I get a timeout from provider....

Select Pictures And Show Selected
I need to make a webpage (php) where users can select some
excercises(with picture) out of 40, and then display a page with only
the selected excercises (with their picture) that you can print.

Showing Pictures From A Mysql Database
I am trying to get pictures out of my database, they are not actually pictures in the database, but I think just a reference to them. I will show in my code.
This is my PHP page I using to display them. Code:

Add 2-3 Pictures With Just 1 Article? (news- Publishing System)
Have a little problem here. I are about ot create an easy publishing system where the administrator can write down a happening, add some pictures and save it in a mysql db. I have created the article table, but my real problem is how to "connect" the pictures with the article?
what should i use to get them connected to just one article?

As a beginning i have this db:
id (unique and primary key i guess i should set this to)
when (the date event will happen)
added (date of when the news where added)
shortversion (a brief summary to use on the first page)
maintext (the article and rest of the text.)

then the problem:
how to include images with this?
1. little thumbnail to use on the first page (about 50*50xp) and then some pictures to use inside the article, larger around 150. From 0 to a 2-3 should be possible.

guess i should use a own table for the images, but how to link them with each other my head and I can just not understand så any help are appriciated !

Can't Delete Pictures From Server After I Upload With PHP Script
I am using a php script to allow people to upload images, but if I go onto the server later, I am unable to delete or rename the images.

Changing Pictures On Index-page When Reloading
I am a beginner but quite curious anyway.

My problem: I have seen websites that show different pictures whenever you enter the site. By doing this, the sites look always fresh and attractive and I like the idea a lot. Now I like to have the same function on my site but I do not know how that works...

Is there anybody who can give a good "explanation for dummies" on how to do that?

Upload And Resize Pictures With Path In Database
First I've must say Im completly new in php scripting

What I need to do is upload, resize pictures with path in database

Here is theory of it, and plan of doing it

Hope somebody can help me

here are 4 sizes of images:

- newimagename1_1 with size W=100 and H=67

- newimagename2_2, newimagename3_3, newimagename4_4, newimagename5_5,
newimagename6_6 with size W=308, H=208

- newimagename1 size W=308, H=208

- newimagename2, newimagename3, newimagename4, newimagename5, newimagename6
size W=500 and H=375

Code should go in this order:

- check if folder with name "ID_of_user" exists

- if it exists than upload images to it, if it doesn't then create it and
upload images

- array (image1, image2, image3, image4, image5, image6)

- foreach(array)

- if size of images are biger than W=500 and H=375 than resize them to W=500
and H=375m, if are not leave them as they are

- copy (resized) images to same users folder with name "newimagename.jpg"

- array (newimagename2, newimagename3, newimagename4, newimagename5,
newimagename6)

- for (newimagename1)

- resize newimagename1 to W=308, H=208

- copy newimagename1 to same users folder with new name
"newimagename1_1.jpg"

- resize "newimagename1_1.jpg" to W=100 and H=67

- foreach(array)

- resize array to W=150 and H=100 and copy them resized to same user folder
with name

"newimagename2_2, newimagename3_3, newimagename4_4, newimagename5_5,
newimagename6_6"

- conect to database

- insert into database path of images (image1, image2, image3, image4,
image5, image6, image7)

values (newimagename1_1, newimagename2_2, newimagename3_3, newimagename4_4,
newimagename5_5, newimagename6_6)

- Delete (image1, image2, image3, image4, image5, image6)

- Display images (newimagename1, newimagename2_2, newimagename3_3,
newimagename4_4, newimagename5_5, newimagename6_6)

with link to biger images (newimagename1, newimagename2, newimagename3,
newimagename4, newimagename5, newimagename6)

- Display image newimagename1_1

Using The Same Page To Display A Hundred Pictures One Picture At A Time
I have over a hundred pictures I would like to present.

Is it practical to create and parse an array of pictures,
picture paths, et al using server-side scripting to
accomplish this?

I created an array already, and whereby, the HTML and Javascript
currently used amount to about 14KB for each of four different
pages, the PHP page I started working on is already over 35KB in
size (most of it is server side processing creating the array of
pictures).

What I'd like to do, is load the array only one time, and keep that
loaded so the page doesn't recreate the array each time, thus
minimizing the server side array creation.

Also, I think I'm running into some problems whereby the
javascript is messing up Google's parsing of the page.

I don't see creating 100 different html pages as an answer,
in the respect if something ever changes, that's one big mess
to update and major portion of the content and alot of files.
Am I wrong in trying to avoid doing it via strictly HTML
pages?

The pages exist at, and they represent swimming pools designed
by the owner of Aquatic Creations (North Carolina In-Ground
Swimming Pool Designers):

Custom Swimming Pool Water Features
http://aquaticcreationsnc.com/lib/php/viewing0.php
Custom Designed Swimming Pools
http://aquaticcreationsnc.com/lib/php/viewing1.php
Custom Designed Spas
http://aquaticcreationsnc.com/lib/php/viewing2.php
Custom Swimming Pool Features
http://aquaticcreationsnc.com/lib/php/viewing3.php
Stone And Tile Around Swimming Pools
http://aquaticcreationsnc.com/lib/php/viewing4.php

Does anyone have any suggestions on how to accomplish such
or directions to pursue?

If you could take a look as well and provide comments on the
pages, I appreciate constructive criticism as well.

Open .php File With PHP Designer 2007 By Clicking The File In XP
In windows XP, I want to be able to click on a .php file and have it
opened in PHP Designer 2007,
Or right-click on it and have an "edit" menu option presented to me.
I know how to tweak the registry to do this in general, but what would
the command line look like in this specific case ?
PHP Designer does not do this automatically. It is as if the program
does not allow commandline options.
It only opens with the last file used or a menu of recently opened
files.

Quicker/easier/more Secure To Put Pictures In BLOB Fields In Mysql Or In A Directory?
I am researching the best place to put pictures. I have heard form both
sides and I'd like to know why one is better than the other.

Submit Form Without Clicking Submit Button
I was wondering if it is possible to use something like Javascript to make it so you don't have to click the submit button on a form to make it submit, while using php and mysql. e.g. Code:

Textarea
am trying to display what I wrote in a textarea on a page. I want it to be displayed in the source of the page in one line For example If I will write hi good afternoon! In the source of the page it will be displayed like this: hi good agternoon! I tried doing this: PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved