Re: using <input> tags with php

From: Date: Sat, 01 Feb 2003 22:50:43 +0000
Subject: Re: using <input> tags with php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133929@lists.php.net to get a copy of this message
if i do this: /*all the mysql login stuff here*/ $query=mysql_query("select * from members"); while($new=mysql_fetch_array($query)){ echo "$new['company']"; /*so on through the field list*/ } on output all i get is the title with a submit button..otherwise blank.. same thing with fetch_object()...and i have 1 row in the members table..im sort of confused now that it doesnt work for a wierd reason any better ideas on how to get the stuff out of the table and into vars? maybe im doing it wrong ----- Original Message ----- From: <janet@valade.com> To: <php-general@lists.php.net> Sent: Saturday, February 01, 2003 5:33 PM Subject: Re: [PHP] using <input> tags with php > In a message dated 2/1/2003 2:02:06 PM Pacific Standard Time, > rusty_81@msn.com writes: > > >i tried getting the values into vars using fetch_array/fetch_object and > >fetch_row and tried to put them in variables but for some odd reason it > >really doesnt work because when i try to use the vars in the value section > >instead of printing in the edit box the content of the variable i usually > >end up with "?>", ">", "<?php", or > >"}?>" instead... any reason this shows > >up? and when i do: > >echo "<input type=text name=$name value='$new_var'>"; > >then on the web page i end up with some thing like this instead of the edit > >box: > >">";;"> > >}?> > >any reason for that? > > It sounds like $name and/or $new_var may be empty. Did you echo the variables > before using them in your form to check whether the values from the database > are actually in the variables? > > Janet > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003

« previous php.general (#133929) next »