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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Insert JPG Created With Information From A DB In HTML


I look in my DB for a CODE. I find it and now I want to show the jpg
corresponding to this CODE in html. Here is my piece of code, however
the photo will not be shown.. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Refresh Problem - Warning: Page Has Expired The Page You Requested Was Created Using Information
i got two php page at the movement, which they called edit2.php and edit3.php. when i submit a form from edit2.php to edit3.php, then i could not come back from edit3.php to edit2.php.

Warning: Page has Expired The page you requested was created using information
you submitted in a form. This page is no longer available. As a security precaution,
Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button. Code:

View Replies !
Accessing Dynamically Created HTML Forms
Basically I have a form dynamically created by results from a database. As such it's going to be different ever time it's used. For each row in the database I want to have a drop-down list. So my HTML form looks like this: Code:

View Replies !
Unique Titles To Html Pages That Are Dynamically Created
how to assign unique titles to html pages that are dynamically created through php? The problem IAM having is that although the pages on my site have html extensions when loaded in the browser they are not present on my server, this must mean that they are generated dynamically right? For this reason I am unable to assign unique titles to each page.

View Replies !
Insert Information From A Form Into A Mysql Table.
I am using PHP and trying to insert information from a form into a mysql table. I want to take the address, city, state, zip, country and insert all that info into my table in one row called other1. Is there a way to combine all the values from the form and insert it into one table row?

View Replies !
MySQL Connection - Insert Information Into The Table
I'm creating an online php/mysql form to insert a table. The table has combo boxes for some of the values for the user to choose from and they enter text and numbers for other. IE some boxes are populated when the page loads, and others are not.

Then I need to insert that information into the table. One of these fields is the primary key (an asset tracking number). Most other fields are shows as descriptions on the page, but actually correspond to a number in the table. I.e. the department may show as accounting, but the value stored in the table is 1.

Anyway, when i try to run the page, it is just blank so I guess I have an error somewhere. The top portion works fine because it is being used on ever page, but the bottom portion (the actual form) is not working.

View Replies !
[fopen()] Unzip Uploaded File To Created Newly Created Directory
Right i have already spent the best part of 8 hours trying to get this working.

What i am trying to do:

Upload zip file to directory. Check if upload is successfull and then unzip to directory created by name of zip file.

I can upload the zip file and create the diectory but the damn files wont unzip to the newly created directory ....

View Replies !
Parse And Extract Information From HTML Using SQL
This is a question that seems to have been asked here a few times recently. I've just come across this on PHP Classes and thought it might be of interest to anyone trying to do this, I've not used it myself so it is "Sight unseen" Code:

View Replies !
Created All The Links As An "onclick" Rather Than A Basic Html.
I had a site built over a year ago and the coder has gone awol. The problem i am trying to solve is he created all the links as an "onclick" rather than a basic html.

It works for visitors, but sitemaps and search engines can't follow these as well as it limits pda users too.

if (strip_tags(@$_GET["from"]) != $mov)
{
?>onClick='window.location = "<? echo $_SERVER['PHP_SELF']; ?>?from=<? echo $mov; ?>&amp;state=<? echo strip_tags($_GET["state"]); ?>&amp;max=<? echo $max; ?>&amp;perpg=<? echo strip_tags($_GET["perpg"]); ?>&amp;cata=<? echo $cat; ?>";' class="next_prev_nums" style="cursor:pointer;<?
}
else

can someone tell me how to modify this to change it to a followable link?


View Replies !
Parse An Html Page With Php To Pull Some Information
Im trying to parse an html page with php to pull some information from it and its not working correctly. I am running this to pull the ul from the page. its the only one on the page with the class directories and it doesnt stop pulling information after the end of the ul.

preg_match('/<ul class="directories">(.*)</ul>/', $postResult, $array);

View Replies !
INSERT Html / WYSIWYG
I have been having trouble finding a solution to actually inserting html into a database and then showing it again fully formatted. Code:

View Replies !
How To Insert Tab In An Html Page???
i am making one appllication inwhich the user enters text in textarea field. i am saving this value in database and when user accesses value from database, i want to display text in a format entered by user.

i.e. if the user has entered some text in 2nd line then it should be displayed on second line and not after the end of first line in continuation. if user has entered tab in some location, the tab will be displayed while viewing data from database.

View Replies !
How To Insert $filename Into Html Tag?
i want to insert $filename into src=" " using echo;
but i don't know the right syntax to do this.

This was the codes below that unsuccessfully executed.

$filename = "myimage.gif";

echo "<img src=$filename />";

although there was no error but i don't see the image
i guess my insertion to variable inside a src=" " is wrong...
I hope you will help me with this very tiny insertion problem.

View Replies !
Insert/Add Row In HTML Form
I am trying to find out a way to have the user input as many rows as they desire, right now I only have a form where user can only input one row of data, I am wondering if there is a button lets say named "Add Row", after clicking it, the user can then add row into the database automatically? It might be vague, so let me describe it in a more concrete way. Lets say if I need user to enter a receiving report, the record includes date, sender, contents of shipment, qty.

View Replies !
Using More Than One HTML Form Box To Insert Data
I want to be able to use multiple form boxes to insert data into one field in a mySQL database. Is their a PHP processor function or script that will do this?

View Replies !
Insert Data In A Html Table
here is the code:

<?
$a=array(1,2,3,4,5,6,7,8,9,10);
$b=array(1,3,5,7,9);
$c=array(1,1,2,2,3,3);
$d=array_count_values($b);
$e=array_count_values($c);

foreach($a as $key)
echo '<table><tr><td>'.$key.'</table></tr></td>'

foreach($d as $key=>$value)
echo '<table><tr><td>'.$key.'<td>'.$value.'</table></tr></td>'

foreach($e as $key=>$value)
echo '<table><tr><td>'.$key.'<td>'.$value.'</table></tr></td>'.

View Replies !
Install PHP W/DreamweaverMX Or Just Insert PHP Code Into HTML?
I am brand new at PHP and Dreamweaver MX. We have Linux/appache. I need to create a form on the web/and communicate data to/from an MS Access DataBase. I saw a great tutorial ref in devshed.

If I have Dreamweaver MX, do I need to purchase PHP? Dreamweaver can process PHP code embedded into its HTML, I think but do I need "something" else? What version of PHP is MX using ? Are there other links that provide "PHP script/code" to use to connect to Access?

View Replies !
Insert Data To The Database From An HTML Form
i want to insert data to the database from an HTML form but when i run the script it will insert NULL to the database. On that note i like to request for help from anyone. This is my code

<?php

include "connect.php"

$sql = "insert into TEST values(:name)";

// Parse SQL
$stmt = OCIParse($conn,$sql);

// Bind php variables to Oracle columns
OCIBindByName($stmt,"NAME",$name);
// Oracle converts all column names into UPPERCASE

// Run SQL
OCIExecute($stmt);

View Replies !
"Cannot Modify Header Information" With Large HTML FORM Options
I'm having some really odd behavior with a PHP script. I have it
populating an HTML select form with a for loop. When I try the years
2006 to 1900. I get the following error:

PHP Warning: Cannot modify header information - headers already sent
by (output started at
/Users/chrobb/Sites/city-directory/controlBar.php:54) in
/Users/chrobb/Sites/city-directory/controlBar.php on line 88

I've done a fair amount of searching and it looks like this usually
shows up when people have some extra whitespace after their closing PHP
tags. Doesn't apply seem to apply here. When I crank the number down on
the for loop to 94 iterations, the error goes away. Once I crank it up
to 95, the error comes into play. So, it's tied to the output somehow.
Looking at the raw HTML, there doesn't appear to be any significant
difference between the version with 94 iterations versus the one with
95 iterations, except for the error and the failure of my script.

View Replies !
Can A Field Communicate To A Server And Return Information To Another Field Without Retrieving The Whole Html Code Again?
I´ve got a sql table which has 3 fields.
Their relation to each other is like this example.

| CARS | YEAR | PRICE |
ford 2000
ford 2001
ford 2003
volkswagen 1999
volkswagen 2000

I am developing an ASP web page that modifies a specific registry.
So, it loads the information to some fields, but the user will be able
to change only the "PRICE" field.
I have to create two selects, one for "CARS" and other for "YEAR".
But the "YEAR" field will only contain the correspondent years for each
car the user selects. Example: selecting "ford" in the "CARS" <select>
box, only the years "2000", "2001", "2003" would be automatically
loaded in the "YEAR" <selec> box.
How could i implement it?

View Replies !
Pass Information Through A Link That Will Tell The User That Their Login Information Is Incorrect.
i am trying to pass information through a link that will tell the user that their login information is incorrect. the link for the login page looks like this

<a href="index.php?act=login">

now on that page i have this if statement

if (isset($_GET['error'])) {
echo 'Invalid login data supplied. Please try again.'
}


I have tried to make the link
<a href="index.php?act=forgotpass&amp;error=1"> but the error will not display any thoughts?

View Replies !
Insert Html / Pdf Into "image" Column In MSSQL 2000
I am trying to insert uploaded files into a M$ SQL 2000 database. The uploaded files are validated as either PDF or HTML and then passed to the database. They need to be stored in an image column so that they can be indexed for fulltext searching.

Currently I get the following error when inserting the files into the db -

"Operand type clash: text is incompatible with image"

The files are read into a buffer and then they are prepared for the insert. I have tried both addslashes() and replacing a "'" (single quote) with "''" (two single quotes). I have seen suggestions that the data should be base64encode()'ed but can't get anything to work consistantly.

View Replies !
Sessions - The New Information Does Not Replace The Old Information
I am new to sessions and don't really understand why something is happening. I have created a form with name and address inputs. I have created the variables as:

session_register ("name");
session_register ("address");

These variables flow to the next page just fine. However, if I go back to the form and edit the information, the new information does not replace the old information. It defaults back to the original entry. Am I doing something wrong? Code:

View Replies !
Insert Values - Table Has Four Columns To Insert Into
I have a bunch of information that I want to insert into a table

insert into TABLE values ('hello','I','am','lost');

pretend that the words that are being inserted are coming from a form for another page. In he case I above I have declared that the table has four columns to insert into. What if I do not know how many columns there are?

View Replies !
Insert Into Table - $query = "INSERT INTO Tbl
I have a small problem which I've been working on for a while. PHP Code:

$query = "INSERT INTO tbl(username,ip,link) VALUES("Brin' . $result['id'] . '","$REMOTE_ADDR","http://www.domain.com/sub/start.php?username=Brin"' . $result['id'] . ' )";
mysql_query($query);

Any ideas?

View Replies !
Get Last Created ID...
When a user is created I need to create a directory for their images. How do I get back the ID just created from the DB? PHP Code:

View Replies !
PHP-created Images
I've been wondering - how do I make dynamic images in PHP (example - the
PHP and Zend logos when you do phpinfo().)? I have seen it done on several
websites and I want to do it.
Also, is there a correct way to use PHP to retrieve images? The only
way I've ever got this to work is using require(). Here is what I did
(note: it only works with ASCII encoded images, otherwise PHP errors):

<?php

switch ($imgnum)
{
case "1":
require ("/home/img/menubutton.gif");
break;
case "2":
require ("/home/img/userprfl_bt.gif");
break;
case "3":
require ("/home/img/srch.gif");
break;

//etc...

case "":
default:
require ("/home/img/error.gif");
break;
}

?>

View Replies !
Created A Php Upload Using Mac OS X
Is it possible to create a PHP uploading file so that I can place images/text into a destination that I have assigned "write-only?"

If so, could you point me to a URL (URI) or sample code that tells me how to copy the file into the folder I want on  my Mac OS X.

View Replies !
PHP Session Created
I have a problem whereby each time I reload a page a new php session is created in my temp folder. Needless to say that sessions are not passed from one page to another. I've been searching for the past two days bugs on php.net and php.net page on session seem to give info but it is not working for me.

View Replies !
Last Indexed Created
I trying to find the command which tells you the last auto index after an insert query to a database, i know there is one i sae it yesterday, just cant find it again today.

View Replies !
Created By Mkdir()
I used PHP to create a new directory, lets call it "newdir" within the "test" directory on my server. That worked fine, and so because I was only exploring the mkdir fuction I then deleted newdir. Looking at the server through FTP, the test directory is now empty.

However when I try and delete test I get an error saying that the directory is not empty, so I can't delete it. Is there some behaviour of mkdir() I don't know about that means there is some kind of "memory" of the newdir directory.

View Replies !
Files Created With Php
You know when you create a file using php, it creates the file under a different owner, and you can only delete that file using php or if you have root access. Is there anyway I can get around this? I don't have shell/root access, only ftp so please keep that in mind. As stated above, i'm assuming this is quite common for people that are on a shared box and I would like to know if anyone had any tips.

View Replies !
Displaying Information From A Database Andinsertion Information To A Database
im trying to make it so veiw_forum.php?forumid=1 displays all the information from the database that has forumid to the value passed in the varible, but my code isnt working Code:

View Replies !
Insert Statement Doesn't Insert Anything
I have an int field in a database and for teh purposes of this case the insert statement doesn't insert anything into the field using the ' ' syntax however in the mysql database this appears as 0. I was wondering can I still use the empty syntax as follows or will it not work as it is 0 does is this not classed as empty?

  if (empty($row['intTest'])){
 
 $sns= "empty";
 }

View Replies !
Uploaded File Ok But Not Created
I'm trying to perform a very simple file upload page and everything seems to go just fine. The $_FILES var is populated with valid data (file size, name, mime type, even from a win remote computer) but the file just doesn't exists... It points to /tmp/php[random garbage] but there's no file starting with 'php'. /tmp is world-writeable so I don't see what the problem is. PHP Code:

View Replies !
IE Won't Display Gif Created By GD Threw Php.
So if I create a gif image using the source below the image won't
display at all in IE. I just get a red X. It displays right with
Firefox and it also displays okay if i open it up in Paint or *name your
image software here*. Why won't it display in IE? Is there something
I need to do special to make it work?

#!/usr/bin/php
<?
$DOTS = 5000;
$WIDTH = 6300;
$HEIGHT = 6300;

$im = imagecreatetruecolor($WIDTH, $HEIGHT);

for($i = 0; $i < $DOTS; ++$i){
imagesetpixel($im , rand(1, $WIDTH - 1), rand(1, $HEIGHT - 1),
imagecolorallocate($im, 250, 250, 250));
}

imagegif($im, "../public_html/map.gif");
imagedestroy($im);

?>

View Replies !
Problems In IE With Created Gifs
Wondering if anyone else has had problems with gifs created by php or if
anyone sees a problem with this code.

Symptom: created jpegs work fine and created gifs work fine in Netscape and
Firefox and when directly viewed.

IE displays gif fine *via internet* BUT off of a CD or local HTML file it
won't display the file.

I have run a dozen gifs through the process and it has happened to every one
of them.

function thumbnail ($src_file, $path) {
$orig = $path . '/' . $src_file;
list($w,$h,$type) = getimagesize($orig);
if ($type == 2) { // jpeg
$src_img = imagecreatefromjpeg("$orig");
$name = "thmb_" . $src_file;
$thmb_and_path = $path . $name;
if(!file_exists($thmb_and_path)) {
$image_info = getimagesize($orig);
$src_width = $image_info[0];
$src_height = $image_info[1];
$dest_height= 80;
$dest_width = ($dest_height/$src_height) * $src_width;
$quality = 30;
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width,
$dest_height, $src_width, $src_height);
imagejpeg($dst_img, $thmb_and_path, $quality);
chmod("$thmb_and_path", 0777);
imagedestroy($src_img);
imagedestroy($dst_img);
}
} else if ($type == 1) { // gif
$src_img = imagecreatefromgif("$orig");
$name = "thmb_" . $src_file;
$thmb_and_path = $path . $name;
if(!file_exists($thmb_and_path)) {
$image_info = getimagesize($orig);
$src_width = $image_info[0];
$src_height = $image_info[1];
$dest_height= 80;
$dest_width = ($dest_height/$src_height) * $src_width;
$quality = 30;
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width,
$dest_height, $src_width, $src_height);
imagejpeg($dst_img, $thmb_and_path, $quality);
chmod("$thmb_and_path", 0777);
imagedestroy($src_img);
imagedestroy($dst_img);
}
}
return $thmb_and_path;
}

View Replies !
Folder Created, But No Access
thats an error i try to solve for quite a while already but didn't find a
solution yet.
My problem: I'm writing a little cms, that should create a folderstructure,
so that you can put files in via ftp.

My script (simplified):
mkdir("00000031",0777); // creates a folder named with the id of a
database-record e.g. 00000031
chmod("00000031",0777); // sets the rights again to be sure, because i
experienced problems with mkdir not doing it sometimes in the past
chdir("00000031"); // should change to the folder but leads to:

Warning: SAFE MODE Restriction in effect. The script whose uid is 611 is not
allowed to access 00000035 owned by uid 60000 in /[...]/admin/admin.php on
line 85

Its clear, the script belongs to me (user 611) but the folder belongs to the
PHPuser 60000.

The Trial to solve this using mit (chown("00000031",611); ) unfortunately
leads to:

Warning: chown failed: Operation not permitted in /[...]/admin/admin.php on
line 84

What can i do in order to get access to the folder, for putting more folders
and files inside?

View Replies !
Populate A Table That Is Already Created
I'm trying to run some script to populate a table that is already created. When I run the below code I am getting the completed message at the end, but my data is not going into my table....is there something incorrect with this code that is causing the issue? Code:

View Replies !
Cant Use Include In A Created Php File, Why?
I run the below code to create a new php file

$fp2 = fopen("a.php", "w");
$P1= "<?php include ("template.php"); ?>";
fwrite ($fp2, $P1);
fclose ($fp2);

when I then display a.php in ie, I get a blank page if I copy a.php to my computer, then ftp it back, I get a full page of text and images as expected.

View Replies !
Way To Have Variables Be Created Dynamically.
I know there's a way to have variables be created dynamically. What I'm trying to do is to pass information about products to PayPal, but I don't know how many products are going to be in each cart.  It could be 1 or 100. I need to create a variable who's ending number changes depending on how many products are in the cart. How do you have those created dynamically?  I need the information to be passed through hidden variables via an HTML form as well.

View Replies !
How To Get Value From A Dynamically Created Textbox
how to get value from a dynamically created textbox using php

View Replies !
Knowing If Cookie Was Created?
Is there anyway, in php, to use the script to check if the cookie (made by setcookie) was actually created?

View Replies !
Permissions On A Folder Being Created
Does anyone know why the folder being created here ends up with the permissions other than 777?

$userdirectory = "./users/$uname";
mkdir($userdirectory, 0777);

I want the folder to be 777 and it is not giving this permission

View Replies !
How Do I Display A Dynamiclly Created Xml Doc
simple question from a man whose never used xml with php.

i am created a doc with DomDocument - thats the easy part. what do i do to make it display as an xml doc? add a doctype? how do i do that?

View Replies !
Get The Name Of All Classes Created In A Php Script ?
Is there a way to get the name of all classes created in a php script ?

View Replies !
New Table Created From Variable
Is it possible to create a table in a mysql database using a variable that originated from a form? I've searched the net for some info on this, but have had no success.

Basically I want an admin to be able to set up a weekly round of football, and have a new table created for that round, based on teams set up each week using a form. The admin would enter the round number, and that would be the name of the new table.

The teams listed in the form would simply be posted in the table after it is created with a game ID. So far, I only know how to create a table by running a sql query, but the admin won't know how to do that, I'd rather if it could be done using a form.

View Replies !
Functions Created In Eval()
I am trying to be able to execute portions of code stored in a database using eval(). My question is, if I create a function inside of an eval() statement, can it be executed from code outside of the eval statement. For example, if I have the following code in my database:

function test() { echo 'test'; }

And retrieve it from the database as $test, and have this code:
eval($test);
test();

Should the function call work correctly? The reason I ask is because when I tried to do this, I got a "Call to undefined function:" error, and I'm trying to figure out if it's something I did wrong, or if I just can't do that.

View Replies !
Dynamically Created Link
I have written a script that will echo dynamically created links, however I am having trouble getting these links to open in a new window.

Here is the trouble code:


echo "<hr>
<a href={$row['url']}?sid={$row['id']}$sid>target="_blank" {$row['dname']} </a>

I know the problem is that php sees target="_blank" and therefore thinks I am trying to create a variable named "target". So it's giving me an unexpected T_STRING error. How can I format this so that php understands what I'm trying to do? Also, I can't set all links to open in a new window, as there are other links on the page that should not generate an additional window.

View Replies !
Created A Search Function
i would like created a search function the seach the html file with the content inside. can anyone give me some idea? it not only in one page, but a lot of html file and inside each file are fix contents. how can i done it? another problem but also search funtion problem. this search function was match the word in database with the keyword.

when the user enter a keyword, firstly we need to separate it to individual word add with original keyword and recontruct all possible order of the keyword ??? then jz using query to match with contents in database? if i want to detect duplicate content based on two fields in database, then i need to recontruct all possible order of the keyword user enter, then using query to match it, isnt like that? how can i make the search result that most related in the top?

View Replies !
File Created Date?
I know about getlastmod() but is there one for created date? If not is there some other way of getting the created date of a file?

View Replies !
Menu Created With Switch{}
I'am generating my menu from a function using variables from arrays of items,

the index page has the following code ....

View Replies !
Files Created In PHP Not Viewable Via FTP
I've created a simple web app for users to upload images, which are then copied to a web directory using the PEAR HTTP_Upload library (which uses move_uploaded_file()). Once copied, I'm setting the mode of the files to 0666, so they should be read/writable by any user. When I request the files by HTTP or in another PHP script, they show up fine. However, the files do not show up in a FTP client. No funky .filenames here, just a uniquely generated name like 27298429292d74ee94.jpg.

Unfortunately, the hosting site I have to use only allows FTP access. I can't get in via telnet or SSH to check if the files are viewable using those methods.

View Replies !

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