Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-18-2002, 03:30 PM   #1 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
Help with echo. Yes, I said "echo".

echo "
<form action=$PHP_SELF method=post>
<input type=text name=wholesale size=10 value=''>
<a href='$PHP_SELF?addit=1'>ADD ME!!!</a>
</form>
";

if($addit)
{
echo "<option>$wholesale</option>";
}

//am I crazy? This just doesent seem to work!
rockyracoon is offline   Reply With Quote
Old 06-18-2002, 03:39 PM   #2 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
are you putting all that inside <?php ?> ?
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 06-18-2002, 04:03 PM   #3 (permalink)
rockyracoon
Registered User
 
Join Date: Jun 2002
Posts: 10
rockyracoon is on a distinguished road
Yes I am. I think its because the variables arent set with an href only a submit button. what is the best way to call using submit???

echo "
<form action=$PHP_SELF method=post>
<input type=text name=wholesale size=10 value=''>
<input type=submit name='addem' value='Add'>
";


if($addem)
{
echo "<option>$wholesale</option>";
}

echo "
</form>
";

/// hmmm that doesent work either.
rockyracoon is offline   Reply With Quote
Old 06-18-2002, 04:17 PM   #4 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
http://mattmcinvale.com/test.php

here is the exact file i uploaded.

<?

echo "
<form action=$PHP_SELF method=post>
<input type=text name=wholesale size=10 value=''>
<input type=submit name='addem' value='Add'>
";


if($addem)
{
echo "<option>$wholesale</option>";
}

echo "
</form>
";


?>

it seems to be working fine on my machine.. what version of PHP are you running?
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 07-10-2002, 01:50 PM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,696
redhead is on a distinguished road
Then one must ask, why isn't the <option></option> located within a <select></select>, since <option> is only usable in a <select> part of a <form>
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
print vs. echo Epsilon PHP 3 09-14-2004 07:47 PM
A Couple PHP & MySQL Questions Geetazz PHP 10 07-23-2002 06:56 AM
Control table display with php & Postgresql? tomycon PHP 2 07-17-2002 07:16 AM


All times are GMT -8. The time now is 09:37 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting