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




Form Doesnt Show Due To Php Conflict


I decided to load some of my form via php as it was needed to generate a combo box with infomation from a query.. this is what i have yet it doesn't load up on my browser.. Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
GET / POST Conflict In A Multi-page Form.
Wonder if anyone can help with this problem:

I am using an app with several pages, using a session to track vars
between the pages, and using an image map to re-direct back and
forwards between the pages.

The way I redirect is when the image map is clicked on, it posts to a
page called 'control.php' which passes the POST vars to the
corresponding SESSION variables, then redirects to another page, based
upon the co-ords of where the image map was clicked upon.

I have added text links at the bottom of the page:

i.e.

<--- previous page

----> next page

but because the image map POSTs the data to 'control.php', I can't
really add a GET query string to the link at the bottom of the page,
because nothing will be POSTed.

....But then again, I can't add a POST link to the HREF, because it
won't pass the co-ords, and I can't add a special variable to identify
the link to the control form -i.e. control.php?link=3 (as I could with
a GET) and re-direct accordingly.

So, after hours of thinking about this, I'm stumped.

The only idea I have is to hack the image map up into smaller pieces,
add ALT tags to each one, and make do with it - or add NEXT and
PREVIOUS submit images at the bottom of the page too.

If I make do one with large image map, it is no use to someone who is
visually impaired and relies on ALT wordings.

Is there any possible way to achieve what I am trying to do ?

Form Validate, But User Doesnt Have To Retype
currently i have a form, and when users click on the submit button, the contents get validated, and if there is a mistake, the user is brought back to the form page. What i want is to free the user from having to retype the sections that they got correct, and only retype the sections that are wrong. I am thinking of getting the form to send the content to my validation page, and back to itself $PHP_SELF so that if there is an error, the message will still display. Is this the correct way to do it? Code:

PEAR Conflict
Iam running a server and PEAR is compiled with PHP. Before some days I have
upgraded PHP from 4.3.4 to 4.3.7 using Apache update from WHM (cPanel). This
went well but after that one client contacted me to tell me that he have
problems with showing some variables. The thing is that he told me that he is
using his own PEAR installation in his web hosting account !

This is part of the code which had a problem:

$ID_rubrike =$row[ID]; //THIS VARIABLE NOT SHOWING

$ID_stranice =$row[ID_stranice]; //THIS VARIABLE NOT SHOWING

$tip_vijesti =$row[$naziv_tablica];//THIS VARIABLE WORKING OK

Problem was found but it is weird. In his configuration od DB.php file following
value was changed :
define('DB_PORTABILITY_LOWERCASE', 0); This value was somehow set to "1" so "ID"
was watched as "id"

Then he change it back to "0" and it is OK now. I inspect server's PEAR
installation under PHP and found that this value default is "1" . But it seems
that his scripts are using his PEAR installation and not server PEAR.

Session ID Conflict
I have a system where the member can log in and edit their profile or download articles relevant to their area. These two links are on the index page. Editing the profile grabs the ID from the logged in session and pulls up the members details from the "MEMBERS" table (username and password also resides there). On the downloads page I have a table containing all the downloadable articles. This page uses a table called "FILES". This table has it's own ID field.

My problem comes in when you download an article. Once you've done that (that works fine, by the way), and return to the index page, the "Edit Profile" links adopts the ID of the downloaded file on the downloads. I think it's because on the downloads page there is a "isset" script for the ID. So it brings that ID back to the index page. How do I prevent that? How do I get it that even after a file is downloaded, returning to the index page has the "Edit Profile" link referring to the logged in session and not the ID that was set on the downloads page. I've tried "unset(&_REQUEST['id'])" - excuse the syntax, it's just an example - but that didn't work either.

MySQL Apache PHP Conflict Problem
I'm having a problem that I'm not sure of the source for... so I'm asking
here as the Apache group doesnt seem to know anything about the error
message Apache generates.

The error message is "Your program accessed memory currently in use at
00003f13 from 167f:02fe"

This only happens if I start mysqld.exe then apache then shell out of a
web page using PHP exec() to execute another program.

If mySQL isn't loaded there is no error which initially suggests mySQL is
the problem however its apache that errors out but only if I shell out
to PHP suggesting a confilct problem.

I'm using
-----------
Win98
Apache 2
PHP 5.0
mySQL 4.1.22

Has anyone seen anything like this - googling produces nothing I can find
that seems relevant.

Could Someone Show Me How To Make A Form Handler?
I have tried and tried, but I can't seem to make a php form handler. I would love it to be able to check for required fields, and to be able to show the viewer their information before it is submitted, so they can make changes before it is submitted.

Show If Form Varible Not Empty
I need an alteration to my code to show region only if the form varible from the previous file is not empty.

I have a list of properties in a table called employees, database name gcproperty.
Some properties dont have full records in the fields (photo1, photo2, etc..........to photo9. and are empty.

On the show all details page some images are blank as there is no record in the database or where drawn from the form varibles browse page that where also empty.

Does this make sense? Code:

Popup Window Show When Php Form Is Validated.
I am using a HTML/PHP form on a website I am doing. The form works and it even redirects to the correct page. However, instead of redirecting to a new page I would like it to call a popup window (600px x 400px)but leave the page that the form is on open so when they close the popup window the page is still there.

Double Quoted Values From Database Won't Show Up In Form
I enter user input from a form into a mysql database using addslashes. When I access values with a double quote from the database they won't show up in a text form field as the default value. I use stripslashes when accessing database values, magic_quotes_gpc is on, magic_quotes_runtime is off, magic_quotes_sybase is off.

Show Stored Value For Form Field Type=file
I have a file-uploading form to uploads a .jpg file and stores its name in a table in my db as co_bannerfile. I'm trying to now write an update form so the user can update their .jpg file. I've successfully written a query to retrieve the stored file's name.

How can I display the stored file's name so the user can see its name within the input TYPE="file" field and then decide to update it or not? The following doesn't display the stored file name. What do I have wrong? Code:

Db4 Dba_replace Doesnt Seem To Work For Me
I am trying to write to a dba and the result is creating a database
file, but not writing anything to it. The relevant function is being
called, and my variables are populated, but the database file remains
empty. Am I writing the string arguments wrong, please ?

function addplayer($realname,$pokername){
$dbh=dba_open("../pokeraliases","n","db4") or die ("Couldnt make the
database");
dba_replace("$realname","$pokername",$dbh);
dba_close($dbh);
print ("PERFORMING ADD FUNCTION <br />");
print ("posted variables are $realname and $pokername <br /><br />");
}

if ($addplayer=="add") {
addplayer($name,$alias);
}

Posix_setuid Doesnt Work
I've got problem with posix_setuid().
I've compiled php with --enable-posix.
Everythin like posix_getpwuid() works fine
except posix_setuid and posix_setgid.
Configuration:
php 4+mysql 4+apache 1.3.31.
System - FreeBSD 5.3

If Page Doesnt Exist
I did the mistake of writing my whole website on one index page

The problem is, each page uses
if ($_GET['pg']==page){
#code
}

But if it is not a page, it doesn't execute anything. and the whole site is messed up. Is there anyway to make it so if $_GET['pg'] is not a valid page, then go to a 404 script?

Preg And Why [^word) Doesnt Work?
I was trying to write a script to replace some text inside some tags.

Lets say I had <tag stuff=stuff><tag stuff=otherstuff><another>

I wanted it to find all the <tag and remove them.

So I tried to write it so that it would go forward until it reached
[<^another] came. But when I tried that it would respond to another as
single characters and not as the word.

How can I do this with regular expressions, matching up against words using
[^ ] ?

I know I can do what Im trying to do other ways, but when it didnt work with
[^ ], it got me thinking about how to do it that way. Because there might
come other times when I want to 'NOT' against a word, and there has to be a
way of doing this with Regular expressions?

Odbc_fetch_array Doesnt Return Any Values
My problem is odbc_fetch_array returns no value at all, but the scripts returns no error and all i can see in the page is the html table without any data in it..

the connection to oracle via odbc works, and in my other scripts i used odbc_fetch_row to retrieve data, but this one is kinda slow in getting massive amount of data from oracle. im now testing which is faster, odbc_fetch_row or odbc_fetch_array? but odbc_fetch_array returns no value at all. PHP Code:

Code To Show Slide Show In PHP
Can anyone guide me as to how can i display a slideshow of all the images present in an album and if possible the code.

Show Table Only If There Is Data To Show?
I have a table that shows specific data (via a while loop)

however, when you first log in as a new user, you see the table column headers but there is obviously no data, and it looks a bit unsightly.

How could i take this code:

Wrong Error Line That Doesnt Exist?
I got the wrong Parse error: parse error, unexpected $ in /web/www/frac/users/ultimadark/train.php on line 104. But i counted the rows three times and i have only got exactly 104 rows in the page, and the 104th row is only </html>. Why do i get that wrong message

Mysql Doesnt Return All Results Of A Query
I have an sql query like this:
SELECT column FROM table WHERE column1="3" AND column2="1"
This query works perfectly if i run it in the command line, to be
exactly it return two results.
But if i run it from php i just get the first of the two results.
Any ideas?

Mysql 4.1.8
php 5.0.3

I have a second problem. But its more of a question.
if i run the foreach loop on an array like this
array("id" => "78"), then it splits 78 up in 7 and 8.
Now you say its stupid to use a foreach for this array. But in the
function there i use it the array could also be two dimensional.
Is this behavior normal? I looked in the php manual but found nothing.

Using Fopen() To Create New File - Works For A Few Then Just Doesnt
I am currently working on a content management system where a user can
fill in a form (title, keywords, link text etc. - all the initial
attibutes), which when submitted, will go onto create a web page.

The code is as follows:

$html = "<html>
<body>
<p>Hello World</p>
</body>
<html>";
$handle = fopen($_SERVER['DOCUMENT_ROOT']."/path/to/folder/".$filename,
"w");
fwrite($handle, $html);
fclose($handle);

Pretty basic, I think. I works for a few and then it just stops. I get
no error to say that 'could not create file' or 'file not found', it
just submits. Any reason for this? I have tried searching the C: drive
for the file but it cannot be found.

At the moment Im trying to figure out when it actually occurs but for
some annoying reason, it seems to be working now. I would prefer to be
assured that it wont occur again so just thought I would still post
something here just encase this problem is a known one.

Is fopen() the best solution for creating files? I was aware that it
was used to open an existing file but create one (?). Is this what it
was intended to do? Im sure it is, but its new to me.

Php Upload Doesnt POST Any Info In Firefox
I am not sure why but I have had this problem for a while and havent really been able to solve it. A really simple php upload script works in IE but not in FF. FF just comes back to the page as if there is no POST information. For example code below will output when landing on the page, it outputs: Code:

Changed To PHP5 Now Script Doesnt Work
I had a dynamic img creation with gdlib and Right Alignment. I 'pinched' this script which worked well until my host upgraded to php5. Any ideas. the following error messages are received.

‰PNG  IHDR&#65533;2ý~Ê
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in /home/clearcon/public_html/fonts/title.php on line 40

Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in /home/clearcon/public_html/fonts/title.php on line 40 Code:

Outputting A Table Or Form Using SHOW FIELDS FROM Table
In the code the MySQL database was queried using "SHOW FIELDS FROM table" which and the returned results of column names was then use to build an output for a form and a table with php using a series of if statements along the lines of if the returned field name matches something echo a text input field.

I have never seen this done this way before, so I want to get the opinion of the devshed user. Does it seem like an unsual long process to build up a form. Is there a security advantage doing it this way? Has anyone ever done it this way before?

Back Button Doesnt Display Previous Page
Here is an example of my code. PHP Code:

Getimagesize() Not Working ... Image Exists, Error Says It Doesnt :(
I am using the latest version of PHP and GD (reinstalled both today -
march 29 2005) and am using GD to create thumbnails on the fly. I am
having no issues with GD, however, I am now trying to retrieve the
width and height of other images withought ANY sucess ... I am
recieving the same error repeatedly :
"... failed to open stream: No such file or directory ..."

I am replacing spaces with '%20' as PHP.net suggests, and have parsed
local and full paths (which all work when entered into a browser) with
no success.

here is my code :

$image=str_replace(' ','%20',$_GET["image"]);
$imageinfo = getimagesize($image);
$w=$imageinfo[0];
$h=$imageinfo[1];

How Do I Show The Id Of The Last Row?
I've got a database called cutepooch and a table in it called tshirts. What I want to do is display in a php page, the ID of the last row added to the table.

Show All Filesizes
why doesn't this code work? it returns a blank file

<?
$html = "<table width=80% cols=2>";
function display($dir) {
$d = dir($dir);
while ($f = $d->read()) {
if(($f!= ".") && ($f!= "..")) {
if(is_dir($f)) {
$ds = $dir.$f."/";
display($ds);
}else{
$html .= "<tr><td>".$dir.$f."</td><td>".filesize($dir.$f)."</td></tr>";
}
}
}
}
display("./");
echo $html;
?>

Random Pic - Does Not ALWAYS Show
i just want to show up a random pic.

<?
$files = glob("./gfx/zufall/*");
shuffle ($files);
if (count($files) < 1)
$count = count($files);
else
$count = 1;
for ($i = 0; $i < $count; $i ++)
{
$file = $files[$i];
echo "<a href='index.php'><img src='$file' height=ñS'
width=óv' border=&#390;'></a>";
}
?>

it works fine, just ocasionally, it shows NO pic.
whats wrong? that is, how can i solve it?

How Can I Show A Title?
The script below is from a popup window that I have that displays projects, what I would like, is that the title of the window have the project title in it, Code:

Show Array Name
is there a function, that can echo/print the name of an array, so when
i dump the array, it also says the name?

Show Source
Is there a function that can allow me to show an html files source in to a textarea?

Show Image
On a page I have an image tag like this: <img src="showimage.php?image_id=1">

What would the "showimage" script (php3) look like if I wanted to show this image?

Show Pdf Files On The Web
can any body know how to show pdf files on the web

Don't Show If Repeat
I am running an SQL query through a database that will probably have repeat addresses.
The purpose of this query is to download addresses for printing Labels to send out catalogs.

I need a fast way to make sure no repeat address fields are repeated. I know this is possible by running through the whole query again for each record to see if it has any matches, but that will take forever. I need a fast way to do this.

Show Time
in my php file i want to show the time. (preferably time and date) how do i write it? i tryed something like this: "$time= NOW();"

Saving Show.php As A .jpg?
How can I save a show.php file as a .jpg or similar?

Show If Connected!
I am building a script bla bla bla ... Anyways I need a thingy to show if the connection to the MySQL database is there! I cant get my members to be able to log on and i think the problem is for some reason the database wont connect... Can someone just post a quick script to display if the connection exists.

Show X Characters?
Say I call something from the database, like:

<?php

$sql = 'SELECT * FROM `blah`';
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)){
echo $row['lots_of_text'];
}?>

My question is, is there a way for the code to display the first, say, 50 characters of lots_of_text, and then no more?

Server-Side Form Submission - Form Submits To Form, Which Autosubmits. BAD!
I have a php form from which the user fills out their name and address and clicks "Submit".

The form goes to a page that stores the data in a mySQL database, then, using hidden fields, populates another form and actives with a javascript onLoad=submit() to send the information on to the final destination.

I cannot control or edit the final destinations web page, which is why the interim page is needed.

What I would like is for the user to fill out the form, and upon submission have the data recorded into the database and have the data passed on in a "form like way" on to the final destination BY THE SERVER, not by the use of a hidden form page that auto submits.

Any suggestions?

Here is the interim page's code below:

<?
$link = @mysql_connect($db_host_name, $db_name, $the_decoded_password) or die;
@mysql_select_db($db_name) or die;

$query = "INSERT INTO web_link VALUES ('', '$a', '$b', '$c','$d', '$e', '$f', '$g', '$h')";
$result = @mysql_query($query) or die;
?>
<html>
<head>
</head>
<body onLoad="document.contactme.submit();">
<form name="contactme" method="post" action="http://www.test.com/cgi/storethisdata" >
print "<input type="hidden" name="first_name" value="$first_name"><br>";
print "<input type="hidden" name="last_name" value="$last_name"><br>";
print "<input type="hidden" name="email" value="$email"><p>";
print "<input type="hidden" name="phone" value="$phone"><p>";
?>
</form>
</body>

</html>

Show Latest Picture
I'm trying to show the latest picture uploaded, similar to a picture of the day, but not

I'm going to name picture files 001.gif 002.gif 003.gif etc, but what I want to do is get a list of the pictures in a directory and show the one with the highest number.

Show Jpeg From Sql Server
I am trying to show an jpeg image from a table in sql server and i really don't find any information about it. In sql server the jpeg is stocked in a field under the shape of bytes.

How Do I Make It To Show The Next Record?
Can someone please tell me how to create a link that when clicked will go to the next record.

Also, I know how to display search results, when mine are displayed, there is only one record showing, how can I make it so that there are more records show?

404.htm Won't Show For Files Handled By PHP
The account I'm working in has the following .htaccess file:

Action application/x-pair-sphp /cgi-sys/php-cgiwrap/mule/php4.cgi
AddType application/x-pair-sphp .php4 .php3 .htm .html

Now I would like to add a customized error page ie.:

ErrorDocument 404 /serverror/404.htm

However it doesn't work when the requested file is of an extension which is parsed by php (but with all other files) and instead I get a 500 Internal Server Error.

Show_source Show Value Of Variable
I'm working on a script which should make it possible to create selects in a form with only choosing a table and a Field. Everything works properly. But I want to copy the php source code of the created form so i can use this in other files. my form code is like this ($Tabel and $Veld are send from a previous form) PHP Code:

NULL Expected, Won't Show Up ...
I have tho following code.

$_GET['artile'] looks like this: /2006/03/lorem_ipsum

$locationinfo = explode('/', trim( $_GET['article'] , '/') );

list( $article_year, $article_month, $article_url ) = $locationinfo;

echo '<br>year: '.(($article_year === NULL)? 'null': $article_year);
echo '<br>month: '.(($article_month === NULL)? 'null': $article_month);
echo '<br>article: '.(($article_url === NULL)? 'null': $article_url);

The weird thing is, if $_GET['article'] is empty, $article_year isn't
NULL, but the rest is. This doesn't make any sense to me ...

Show Next Results Of MySQL DB
How do I get it so that php reads in the first 10 results out of a MySQL database. Then when Next or something is hit it displays the next 10 results and so on.

2 Adsense Codes But Want To Show Only One
I use only one adsense block on my pages. My pages are usually in wdget.php - widget-blue.php form and there are links on them to some articles. However, when a person clicks on article link they go to widget.php?showfulli_etc. etc. and since I implemented one more adsense code in my script when a person goes to the article page. They see the adsense codes which is the regular one (the first one on wdiget-blue.php and the one in the script which is the second one. What I want is I don't want to show the first adblock when my visitor goes to the article page (widget.php?showfulletc.) instead i want to show the which i implemented into the script.

I was wondering if there is any script will disable the first one when a visitr goes to the article page and will show only the one which is implmeneted in the script.

Show Part Of A String...
I use this code to print a message string from my blog (in the admin) PHP Code:


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