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.





PHP Displaying Info Input On HTML Form


I'm in an exercise where I've created an order form in HTML. The form displays properly and allows me to input certain test order info just fine. The relevant lines in the HTML form are: Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Edit Form Not Displaying All Info
I have an edit form when I run the query in SQL all the information is displayed when I run it PHP the first word then nothing shows up. For example if the data in the field says : 2569 Nutley Street when I run it in PHP it only displays 2569 and nothing else. Code:

View Replies !
Displaying Form Input
I have a textarea in a form that accept input from users. Those who are requesting banner exchange will use the same form. I have an admin page where I can view submitted inputs from users. My problem is user can input things like this:

<a href="http://www.example.com"><img src="http://www.example.com/banner.gif"></a>

When I view it on my admin page, it display the actual banner, and NOT the code as shown above. How can I make it display just the code and not the actual banner?

[edited by: eelixduppy at 2:51 am (utc) on June 7, 2007]
[edit reason] use example.com instead [/edit]

View Replies !
Use Html Form When I Print Value Of One Text Input Of The Form
i have problem with post method , i use html form when i print value of one text input of the form , it prints the value plus the name of the text input plus the = plus the value again.

View Replies !
Checking Form Input - Remove HTML
Well i've eventually manage to get a comments system working on my site, adding information etc. however i want to add a few saftey precausions.

I.e prevent use of HTML commands been enterend into a comment or holding down a single key, that can often lead to tables been pushed out of size, thus messing up the site. i have been using a function that strips out swear words, this works fine, I included an option to remove HTML etc... using PHP Code:

View Replies !
Getting The File Path From A Html Form Input
I want to get the file path from a file input field, not just the filename. I don't have to necesarily use the input of type 'file', but that is the only way i know how to have a browse button.I tried using javascript to fetch the content of the file with this function:

function GetDirectory(){
   strFile = document.FileForm.filename.value;
   intPos = strFile.lastIndexOf("");
   strDirectory = strFile.substring(0, intPos);
   alert(strDirectory);}

but i don't know how to pass the javascript variable to the php.

View Replies !
Displaying Variables In Html Form
Below i have a form which i want to be filled with variables sent from the last page. can anyone tell me why the variables are not showing - I think its something to do with the syntax of the php inside the html form Code:

View Replies !
Displaying A Html Form With Php Echo
I a have a form for users to enter details. Before the form is shown the user enters a number of values they need to enter.

So the amount the user enters first is the anount of rows the user is given to enter there details. To do this iv used a while loop and a $count variable.

My problem is with echoing the form. I must be doing it in a completly non standard way as allthough firefox displays it perfectely ie doesnt display it at all. Code:

View Replies !
Code To Tgake Input From A Html Form And Post It Into My Database.
Can anyone give me some code to tgake input from a html form and post it into my database.

View Replies !
Detecting URL's And Html Tags In Text, Input From Form
Is it possible to check text and set a PHP variable if someone inputs links, <h1></h1> ect. and other html tags when filling out your form mail or guestbooks?

View Replies !
Problem With Displaying A Html Form Embedded In FIREFOX
I'm not sure if this is a php related issue, or if the problem lies with firefox, but i am having trouble making a form embedded in php display correctly in firefox. It displays perfectly fine in IE. Code:

View Replies !
Variable Variables - Basic Html Page A User Will Input A Value For A Certain Number Of Items Using Input Textboxes.
I am currently working on a project where on a basic html page a user will input a value for a certain number of items using input textboxes.

then when they click on calculate it takes them through to the php page where it will calculate which items had a value greater than 0 from the previous page and then perform various calculations with them (i can figure those out myself)

i have been able to do this with 16 if statements for each item, but could cut it down dramatically with variable variables. i want to do something similar to the code below, but am having trouble getting it working. can anyone help please?

just incase u needed to know, each textbox from the html page is named "TEXTBOX1", "TEXTBOX2", "TEXTBOX3", e.t.c up to "TEXTBOX16" Code:

View Replies !
Displaying Daily Info From Database.
I run a site specifically about a theme park, and am looking for a simple script to display current info on the main page out of a database.

It would look something like this...

Today's Park Information
Operating Hours: (Hours Here)
Regular Live Shows: (Show/Time) (Show/Time) etc
Special Events/Concerts: (Event/Time) etc

Problem is I'm a complete newb, all I know of PHP is how to use include to put my navigation bar and such onto a page, and to do extremly simple adjustments to forum interface scripts, etc...

View Replies !
Displaying Db Info After Select Box Array
i have this code here, all the rows of my table, news, are queried and displayed in a select box, ditopic, using arrays..

what i want is after a user selects something from the select box, some other information from the same row is displayed in a textarea right below the select box without having to hit any submit buttons etc.. is this possible? Code:

View Replies !
Query Not Displaying Proper Info
I display a list of items on one page, and when they are clicked on, the user is taken to a more detailed page. Only, it's not getting the proper information to correspond with the 'id' used.

Here's a link to the list page...when you click on an image or the 'model', you can see the proper 'id' is being displayed in the address bar, but not the info in the body. Code:

View Replies !
Use Cookies To Save Info On What The User Enter Last Time In A Input?
I am having some trouble looking for a good tutorial on cookies and how to have them save what you last time entered in the form. So how can I do this so users don't have to renter everything the next time they try to post something on my site?

View Replies !
Displaying Info From User's Field In Numbers
in a loop, what would i use to like, if ina field a user has say 4 'f's (ffff) and i want it to display, You Have: 4 f(s)! but theres gonna be like, lets say the whole alphabet in there, and she can get a new 'f' every minute if she wanted...so anyone have suggestions? and in this table im haveing i have 3 fields, owner(the user) id(the letternumber) and name(the letter itself)

View Replies !
User Authentication -- Displaying Info Based On Login
I would like to display the database info based on the user's login. I am getting the following error:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'


$sql = "SELECT $_GET['user_id'] FROM table_auth_user";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)) {
echo "".$row['user_id']."";
echo "<br /></div>";
}

View Replies !
Displaying Text Fields On User Input
How would I echo a particular amount of text fields depending on how many the user selects from a drop down menu that I have already created. For example say the user selects 4 or whatever other number from a drop down menu how would I echo 4 or whatever the amount of text fields for a user to input text into? An example would be an airline website were you select how many people are travelling and then it echo fields for those people to enter their names.

View Replies !
Reload Form Element Without Loosing Form Info
I have a upload image page which a user can upload image and some description to go with it.

My need is the user would like to be able to create a folder before uploading his image but during have filled the form.

The problem is that the list box which list folders will need to reloaded with out loosing all the data filler in the from ?!??!?

View Replies !
Extracting Info From HTML
Im needing some help with writing a PHP script. Basically all i want to do is write script that can extract data from a table in html format into a MySQL database on my server.

View Replies !
Passing Info From Html To Php
I'm trying to pass info from a "Drop list" in an .html form into a .php which will then query a database. It doesn't work and I wondered if I'm missing something easy?

If I junk the dropdown list and just put a "textfield" there is no problem but I want to have the fixed choices list. Here is the code:

View Replies !
Get Info From A Html Page With Php
im looking for a way to get info from a html page in php i have a code that was sapose to work but no longer does any one have any ideas on how to make it work? here is the Code:

View Replies !
Pass Info From To HTML
I'm wanting to pass a value from PHP into a hidden input in HTML. I don't want it to travel in the URL if possible.

for example to help paint the picture.

From PHP
I want to pass this: value="true"

To HTML
<input type="hidden" value="false">

View Replies !
Extracting Img Tag Info From HTML Source
I'm having a bit of a brain meltdown trying to figure this out. If anyone has a suggestion I could try, that would be excellent.

I'm trying to extract specific pieces of data from an html source file. In particular image tag information. If my file contains lines similar to:

<a href="images/picture.jpg" target="_blank"><img src="thumbnails/picture.jpg"></a>

I'd like to be able to extract the a href URL and the img src as two seperate variables and ignore any other HTML source and tags inside of the file. For all intents and purposes ending up with an array of the following:

$link[0]="images/picture.jpg";

$thumbnail[0]="thumbnails/picture.jpg";

View Replies !
Retrieveing Info Passed From Html
i have a flash banner on a page that when clicked sends the browser to another page. This banner is linked to a php file that counts the amount of clicks on the banner. In the html page for the flash banner I have: Code:

<embed src="swfs/banner1.swf?clicktag=forms/tracking/bannertrace.php&clickheader=http://www.somewebsite.com" width="570" height="80" align="middle">

in my php file I have: PHP Code:

<?php
$traceFile = "banner/clicktrace.txt";
$clickURL = $_GET(clickheader);
$fh = fopen($traceFile, 'r'); $theData = fread($fh, filesize($traceFile));
fclose($fh);$fw = fopen($traceFile, 'w');
$theData = $theData+1; fwrite($fw, $theData);

However the clickheader variable that contains the URL does not get passed to the php file.

View Replies !
Parse An HTML File Using Php To Get Some Specific Info
I want to parse an HTML file using php to get some specific info from that page. How do i get started? Do u have any tutorials about it?

View Replies !
HTML Presentation Page For Uploaded Info?
I've seen a lot of posts about uploading files, but not much about what happens afterwards. Can someone point me to a tutorial, post or book which will help me solve this problem:

I'd like to have a form where users can upload a photo, add a short bio, put in some contact info, and have all of this information stored in a database (natch).

Then I'd like for this form to take this user's data and put it into an html presentation template. Ideally, members would sign in and be able to modify their own profiles as well as view other profiles.

View Replies !
Validating Html Input
I'm trying to set up a system that would allow users to write html in textareas. The porblem is that when coming out of the database and getting slapped on an unsuspecting dynamicly generated page, an open anchor tag can do a number on the site. I need to find a script to validate the HTML any ideas?

View Replies !
How Input XML Data In HTML
I have heard many things about php retrieving information from pearl and mysql. But I have a different function in mind I would like to be able to access XML. How would I do such a thing? Say an XML document like this Code:

View Replies !
Filling My SQL Database With Info From HTML Source Code?
I am desperatly browsing around trying to find some way to add data to mySQL from raw HTML sourcecode.

I basicly have HTML pages showing lots of info on work, and I want to take that info - add it to mySQL so I can sort, select and browse the information in a better way.

Hope someone knows what I mean.. (many online textbased games have this on various fan pages for calculating purposes, ie. Earth2025 and Utopia)

View Replies !
Decode Html Input String
Probably not the correct words in the subject but I'll try to explain. I have software in c++ that sends data to a php file on my website. I have all the connections in place since it echoes back an ok to my code. Problem is the data portion is not being read by the php. I dont know how to reference it. Code:

View Replies !
Html Tags - Validity Of Input
I have some forms within my website, as always I test for validity of input, when testing certain stuff if I put in html tags, i.e. <h1>Heading Here</h1>

and then post it, for some reason the post doesn't go to the script that should receive it, it just goes straight to my root index page, is this some sort of configuration setting, or does anyone know why this happens.

View Replies !
Comment Box With HTML User Input
I'm making a comment box where users can type messages (and include html tags)

When I pass this through my script/MYSQL as text, is there anything special I should do?  (Stripslashes/addslashes/convert to html)? I don't want them to use it to SQL inject or XXS me.

View Replies !
Displaying Data From One Table But Ordering By Info From Another Table
I have two tables. One table (we'll call it 'table1') is set up like this:

email address userinfo
email@email1.com userdata1
email@email3.com userdata3
email@email2.com userdata2
etc... etc...

In the above table, the email addresses are in no particular order cause the row is created when someone adds their userinfo. Code:

View Replies !
PHP Displaying Html
I have gotten quite a few small scripts to work so far but now that I'm trying bigger and bigger things I keep hitting a snag that I can't seem to find the answer to.

I will either use include() or simply write in the html code for the script to display, but all i get when the script runs is a blank white page. When i view the source of that page all it is is an html tag, head tags, and body tags with nothing between the opener and closer. I've tried everything i can think of to fix the problem and sometimes it pops up and sometimes it doesn't and I can't see the difference in my code that is making this happen.

View Replies !
Displaying Php In Html
I have a php search engine script, it works fine and gets results from a mysql database.

I was displaying the results in my html pages by way of server side parsing using php include. For some unknown reason after one year of faultless operation (I did not alter anything) it began to parse my results incorrectly. It would parse the wrong id number for data entries. For example it should have displayed id=3456, instead displayed id=17500 which did not exist.

I gave up trying to solve this problem and used an iframe to display the php search results. But I have been advised that many visitors could have disabled the display of iframes (iframes are being used to inject malware into visitors computers so more and more they will be blocked) into the browser.

Is there any other option to get my php script results to display in my html pages?, could I use javascript to display the results of my php script?

View Replies !
Not Displaying Html After Php
The html after the php is not displaying currently, any ideas? PHP Code:

<?php
include_once("../../private/supplierconfig.php");
checkLoggedIn("yes");
error_reporting (E_ALL);
echo "Welcome $username, ";
//Retrieve details from database to start

$id = $_SESSION['username'];
$query = "select image1, username from suppliers where username='$id'";

    //now we pass the query to the database
    $result=mysql_query($query, $link) or die("MySQL query $query failed.  Error if any: ".mysql_error());

    //get the first (and only) row from the result
...................

View Replies !
Does Php Work With OnClick In An Html Input Statement?
Does php work with onClick in an html input statement?

<HTML>
<input type="button" name="add_picture" value="Add another picture"
onClick="<?php picture_count(); ?>">

I want to call the function picture_count() when button labeled "Add another
picture" is clicked in HTML

I do not want to use submit in place of button since I do not want to submit
the form at this time.

With the above statement, I receive an error expected ";" and the function
is not called.

View Replies !
Format Of HTML GET And Input Type Image
I am trying to achieve something very simple (I think), but hitting hurdles with HTML code. My current code:

form  method = "GET" action="http://abc.test.com/register" >
<input type="image" name= "val"  value="foobar" src="elements/epayments.gif"
style="width:168px"  >
</form>

And the idea is that when I click the (image) button, I want it to invoke:

http://abc.test.com/register?val=foorbar.

View Replies !
Passing HTML In Hidden Input Field
I just wanted to take a poll to see what the best way to pass a chunk of text containing HTML in a hidden input form element would be. I'm trying to pass the text from one page to another to another in a content management scenario, but the whole thing breaks down when HTML enters the picture. On the page where the value is pulled from the database into a textbox, I'm using:

<?
  <textarea cols="45" rows="10" name="blurb">".$blurb."</textarea>
?>

On the next page, the user can review the code displayed as plain text using:

<?
  echo(nl2br($blurb));
?>

There are no problems so far. But at the bottom of that page in the form that will pass the variables on to the script that will write the final changes to the database, everything falls apart when HTML comes into play.

<input type="Hidden" name="blurb" id="blurb" value="<? echo $blurb; ?>">

This line made everything fall apart when I put an anchor tag into the text. The closing > made it think the tag itself had closed, and the link text started printing to the screen.

So, what's the best way to handle situations like this. Would I use htmlentities() to get it to the database writing script and the use html_entity_decode() when actually passing the values into the db? Or is there a more sublime solution?

View Replies !
Php Form Info...
have a form, with a text input "fieldname".
method POST

$var = $_POST["fieldname"]

$var is then used to search in mysql

select * from table where jobtype like '$var%'
OR jobtype like '%$var%'
OR jobtype like '%$var'
OR jobtype like '$var' order by date asc;

basically i'm doing a search for any string that matches the searched
input, being at the beginning, middle or end of the jobtype column.

query works great, except when the string contains the 4-letter word
'info' such as information or informative
then the mysql query breaks down and give the usual:

Error performing query: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'ORDER BY date ASC' at line 1

Now after much debugging, i found out that the php _POST variable
treats anything with info as a numner of 0 value.
inf is treated as text, nformation is treated as text, but anything
with info gets a 0 value.

Searched php.net and couldn't find anything related to this feature,
looked under security to see if it was related to that, but nothing.

View Replies !
Displaying Data In Php - Like HTML?
How do I display data from MYSQL in PHP in an attractive and structured table(HTML) format? For example: I want my database to display all the reviews of a particular movie(like metacritic.com) like this: Code:

View Replies !
Displaying A HTML Table With PHP
I'm new to PHP and I'm trying to get my head around databases at the moment. So far I have a page that kinda takes the mickey and takes a few details from you, it then creates a cookie that can be removed later. It also prompts you to add the data you gave to a database.

All this works perfectly, but when it comes to displaying the results of the database, all I can show is the first entry in the table. Can someone please tell me how I'm supposed to see all of them?

I've read other articles but they don't make much sense to me.

BTW, the database details are as follows:

Database name: visualanteorg
Table name: people
Fields: id, name, shoe_size, job

As you will see if you choose to look at the pages, getting the information out is not a problem, it's just formatting it how I want it, so each entry appears under the other in the table.

View Replies !
Displaying Records Via PHP/HTML
I have currently devised a way to display up to 3,000 records via PHP/HTML by using pagination techniques that stuff an entire DB query resultset into a $_SESSION object to use within pagination.

Here's my question: How good will this work when we start dealing with more than 3,000 records? Like 5,000? 10,000? 10,000+? The $_SESSION object will obviously become too large to be manageable.

What do you guys advise I do to manage this in the foreseeable future? No rush on this of course for now.

View Replies !
Displaying DB In HTML Table
This may be incredibly simple, but I just can't seem to figure it out. Right now I have information from a database going into an HTML table, but not displaying the way I want it to.

The information is a name ("optGrpName") and a price ("optPriceDiff"). The variables are getting displayed vertically... name with price below, then the next name below that... etc... I want it to display horizontally... Names in cells running across the top row, and the prices in cells below their names. Code:

View Replies !
Getting Info Out Of Dynamic Form
I am using the following code to produce a dynamic form.

$result = mysql_query("SELECT id,weight,date FROM weekly_data WHERE
weight IS NULL AND subscr_id = '$toss' AND date <= now()");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
print"<table width=ï`%' id='catchup' border=&#390;' cellspacing=&#390;'
cellpadding=&#390;'>";
print "<form name='form1' id='form1' method='post'
action='catchupprocess.php'>";
print"<tr>";
print"<td></td>";
print"<td>Weight</td>";
print"<td>Date</td>";
print"<td>Waist</td>";
print"<td>Measure</td>";
print"<td></td>";
print"</tr>";
while ($row = mysql_fetch_array ($result)){
//echo $result;
print"<tr>";
print"<td>";
print"<input name='".$row['id']."' size=&#394;' type='text'
value='".$row['id']."'/>";
print"</td><td>";
print"<input type='text' size=&#396;' name='weight".$row['id']."'
value=''/>";
print"</td><td>";
print"<input type='text' size=&#3910;' value='".$row['date']."'/>";
print"</td><td>";
print"<input type='text' size=&#393;' name='waist".$row['id']."'
value=''/>";
print"</td><td>";
print"<input type='text' size=&#396;' value='$measure'/>";
print"</td><td>";
print"<input type='hidden' size=&#3910;' value=''/>";
print"</td>";
print"</tr>";
}
print"<tr>";
print"<td>&nbsp;</td>";
print"<td><input name='Reset' type='reset' value='Reset'></td>";
print"<td>&nbsp;</td>";
print"<td><input name='submitcatchup' type='submit'
value='Submit'></td>";
print"<td>&nbsp;</td>";
print"</tr>";
print"</form>";
print"</table>";
?>

View Replies !
Persistent Form Info
I have some forms that have different parts, and it decides which parts to display through the url ie form.php?showpart=1, showpart=2, etc. If I want to show another part and change the url all the form info goes away.  I'm a self taught PHP guy, I'm decent but not amazing.  My current solution is to use AJAX to write/modify a cookie everytime the user writes something and bring that in when they change the page. Is there an easier way?

View Replies !
Printing Out Info From A Form
I have this php function that reads a text file for input to create a form. I am trying to get the form to print out the data on a separate page, but all I get is a blank page. Am I calling the page correctly, or is this even possible to do? Code:

View Replies !
Sending Form Info
I have a popup window with a form: The popup window is opened like this:

<SCRIPT LANGUAGE=javascript>
window.open('primos.html', 'primos', config='height=300,
width=400')
</SCRIPT>

The form on the popup window is this:

<form action="primos.php" method="POST">
Buscar los primos entre 1 y
<input type="text" size="7" name="max" value="1000"><br>
<input type="submit" name="start" value="Start">
</form>

How can I get the form to send the info to "primos.php" and open it in the original window?

View Replies !
Connection Info Form
I want to make a form that a user can fill out to enter their connection to a datebase, (IE: username, pass, database name, etc) The table will already be specified.

Then the info will be sent to a field in the table (ie:bsconnect) I want the settings page to read the info that they submit, so that when people get the bundle I am working on they dont have to know how to edit the php page and re-upload it.

View Replies !
Cleaning User Input (Removing HTML/stripping Slashes Etc...)
How can I remove HTML and add slashes to a variable?

I know I can add slashes with addslashes($var); but I need to know how to remove all HTML at the same time. Also - Are there any other characters I should strip from the variable (it will be stored in a database and displayed on a web page).

View Replies !
Displaying Text/html In Web POP Email
is it possible that message from web POP mail ( through sockets) appears as html (or text) if it is sent as html, not to appear like source file of the html document? I use web POP mail which is not mine and it displays without problem emails sent as text/plain but shows complete source with all tags if the email is sent as text/html, in other words, it´s useless and very hard to read for user.

View Replies !

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