[PHP] input

2002-03-13 Thread John Gurley

hello,
Someone was kind enough to give me this code for sending a value from 
one page to another, but it doesn't work. I wonder if anyone can see 
anything wrong:

?php
echo '
input name=inp type=hidden value=', $_POST['inp'], '
';
?

I want to pass $inp to another pagee.

Thanks In advance
John

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] passing values

2002-03-13 Thread John Gurley

this is still not working for passing a value from one page to another:

?php
echo '
input name=inp type=hidden value='. $_POST['inp']. '
';
?

When I look at the source this appears:
input name = inp type = hidden value = 

which I take to mean that it does not know what $inp is. could it be 
something with my browser, or am I still doing something wrong (I wouldn't 
be a bit surprised)

Thanks
John

_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: passing values

2002-03-13 Thread John Gurley

Ray,
I am using the post method, and the $_POST is inside FORM/FORM,
but the value is still not passed. Although I'm not sure what you mean by 
You will need to set the value with a post inorder to access it with the 
predefined variable $_POST Could you explain this please.
Thanks again
John


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] re: passing inputs

2002-03-13 Thread John Gurley

Sorry,
 Didn't mean to keep everyone in the dark here is the code:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
!-- saved from url=(0031)http://godel/jgurley/form1.html --
HTMLHEADTITLEUntitled Document/TITLE
META content=text/html; charset=iso-8859-1 http-equiv=Content-Type
META content=MSHTML 5.00.2314.1000 name=GENERATOR/HEAD
BODY background= backgrnd.gif text=ff8c00 link = ff vlink = 00
FORM action=newtune.php method=post name=form1 form
  div align=center
h1WEB BASED MUSIC COMPOSITION/h1
hr

?
echo $inp;
?

img src =notes.gif
h3nbsp;/h3
a href =help.htmimg src =help1.gif
/a
h3Tune Type/h3
SELECT
name=tune
  OPTION selected value=1Jig/OPTION
  OPTION
value=2Reel/OPTION
/SELECT
  /div
  P align=centernbsp;/P
  div align=center
h3Playback Tempo/h3
SELECT name=tempo
  OPTION selected
  value=1Slow/OPTION
  OPTION value=2Medium/OPTION
  OPTION
  value=3fast/OPTION
/SELECT
  /div
  P align=centernbsp;
  P align=center
  h3 align=center Form/h3
  center
select name=form
  option selected value=1A B A B C D C B/option
  option value=2A B A C D E D C/option
/select
  /center
  h3 P align=center Please enter tonerow, selecting from the following 
pitch
es:/h3
  h3 P align=centerDEFGABCcdefgab/h3
  P align=center
INPUT name=tonerow
  /P




P align=center
INPUT name=Submit type=submit value=Submit
  /P
  P align=centernbsp;/P
  P align=centernbsp;/P

?php
echo $inp;
echo 'input name = inp type = hidden value = '.$_POST['$inp'].'';
?


/FORM

/BODY
/HTML



Thanks so much for the help.
John


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] re: passing values

2002-03-13 Thread John Gurley

Thanks everyone for the help. Finally got it working using this:

?php

echo 'input name = inp type = hidden value =';
echo ($_POST '$inp');
echo '';

?

Don't hhave a clue why this worked and the others didn't?!?!?
thanks
John

_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] question

2002-03-12 Thread John Gurley

don't know exactly if anybody will understand what I am asking, but any help 
would be appreciated.

I am taking a value off a web page, posting this value to another web page, 
where more values are taken and submitted to a php page. The problem is that 
the first value (taken from the initial web page) is not known on the php 
page. Is there a way to submit this value from the second page, to the php 
page. All the other values (from the second page) are known on the php page. 
i.e. if I echo $inp (the value from the first web page) on the php page, 
there is no value. sorry if I did not explain that very well, any ideas.
Thanks a million
John

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] permissions

2002-03-04 Thread John Gurley

Can someone pleas tell me if there is something funny when it comes to unix 
permissions and PHP When php creates a file in unix the owner is 
nobodydoes this raise any issues, and if it does could someone please 
tell me a web site where I could read more about this Thanks alot
John

_
Chat with friends online, try MSN Messenger: http://messengermsncom


-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP] stupid problem

2002-02-18 Thread John Gurley

I am getting a variable from a web page ($inst) which is looked at by the 
loop:

if ($inst == 2)
{
do stuff
}

the problem is that no matter what the value of $inst the code enters the 
loop. I know it is some thing small and stupid, but any help would be 
appreciated.
john

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] response

2002-02-18 Thread John Gurley

here is the html part of the code::

h3 align=center Instrument/h3
center
   select name=inst
 option selected value=1Beeps/option
 option value=2Violin/option
   /select
/center

and the php::

echo($inst);
if($inst == 2)
{

}

cheers



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] code

2002-02-18 Thread John Gurley

not trying to be sneaky or hide anything, the only thing is that it is a 
long code and what ever is wrong with what I am using it will not let me 
paste the code over!?!
when I echo $inst i get the expected result (i.e. 1 or 2) but even if the 
result is 1 it goes into the loop...and yes the select method is in the html 
code.

thanks again...sorry I'm making life so difficult by not including enough 
code...I'll try again and post it if I am able to paste it.

_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] got the code

2002-02-18 Thread John Gurley


here is a larger chunk of the code:

html
body background = backgrnd.gif text = ff8c00 link = ff  vlink = 
00 
/body
/html
?
$f=fopen(/home/jgurley/www/test.txt,w);
?
html
center
h1WEB BASED MUSIC COMPOSITION/h1
hr
font size =6 Enjoy the Tune /font
hr
br
font size = 4Tone Row:/font
/center


/html
?

fwrite($f,2\n);
fwrite($f,$tune\n);
fwrite($f,$tempo\n);
fwrite($f,$form\n);
fwrite($f,$tonerow\n);
fwrite($f,1\n);
fwrite($f,tune.sco\n);
fwrite($f,3\n);
fclose($f);

echo($inst);

if($inst == '2');
{
$fp = fopen(xtune.sco,r);

$txtarr = array();
$linenum = 1;
$linetext =  ;

while (!feof($fp))
{

$ch = fgetc($fp);
$linetext .= $ch;

if ($ch ==\n)
{

$txtarr[$linenum] = $linetext;
$linenum++;
$linetext =  ;
}
}

$txtarr[2] = f1 0 512 10 1 .9 .9 .8 .7 .33\n;

$remove = rm xtune.sco;
`$remove`;
$change  = fopen(xtune.sco,w);
$line = $linenum;

$n=0;
print_r($txtarr);

while ($n = $line)
{
fwrite($change,$txtarr[$n]);
$n++;
}

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] printing files

2002-02-13 Thread John Gurley

Just a quick question,
is there a way to echo in your php code lines of a file that you specify.
i.e. you want to output lines 1,4,7 of a certain text file
Thanks
John



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] using eregi

2002-01-31 Thread John Gurley

Hello,
Just wondering if there is a way to print out parts of a text file (i.e from 
line x to line y) using php, the way it is being done now is using eregi and 
comparing strings, but it would be alot better if I could specify which 
lines to print.
Thanks a million.



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problems with system()

2002-01-24 Thread John Gurley



Hello,
  I am in a bit of a pickle and would greatly appreciate any help. I 
have code which writes inputs to a txt file. These inputs are used as inputs 
to a c program. What I am trying to do is use the redirect command  to run 
the code from php. The command is:
./a.outtest.txt

through php I use:
system(./a.outtest.txt); which does not work, (i.e the code is not 
executed)

also, rather strangly when I add another redirect:
system(./a.outtest.txtjunk);
it does write the first couple of lines of the code output to the file.

Can anyone see anything wrong? Any help would be great, thanks again
John


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] use of system/exec

2001-10-24 Thread John Gurley

Hello,
Could someone please show me an example of code using system or 
exec. Would be great if the string was a unix command.
Cheers
John

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]