Page 2 of 2

Posted: Sun Oct 09, 2005 12:02 am
by crzyman
Yes on get_name.php I have:

Code: Select all

$name = $_POST['title'];
But the value is not being passed via the form? I am stumped. Its one in the morning and I am tired. Will tackle this in the morning. Thank you all and good night.

Posted: Sun Oct 09, 2005 12:04 am
by Jenk
You are defining $name, but are echoing $title.

Which do you want to use? :P

Posted: Sun Oct 09, 2005 12:05 am
by feyd
blacksnday wrote:btw.. How can i donate to these forums?
I remember jason (the owner of this site) having PayPal account for donating to the forum... lemme look around....

okay.. I believe it'd be jason [at_ devnetwork *dot^ net

at least that's what it was 18 months ago according to archive.org ...

Posted: Sun Oct 09, 2005 12:17 am
by blacksnday
crzyman wrote:I tried this, but it still won't pass the value. I want the value of $title to be passed to get_name.php. I am still new to php, so please forgive my lack of knowledge.

Code: Select all

<? $title = "name"; ?><FORM METHOD="POST" ACTION="/my_page/names/get_name.php"><input type="hidden" name="<?php $title ?>"  value="<?php $title1 ?>" >
sorry, based on your previous post it should be something like
$title = $POST['name'];

anyways, I think
$variable = $POST['formfieldname'];

then use the $variable whenever you want to retrieve the value.
But only if its from a form... if its from SQL then it's a tad bit different?
should mainly be used when wanting to pass form values?
At least for my News Script Code, this has worked everytime.....

Posted: Sun Oct 09, 2005 11:52 am
by pilau
That is what he's trying to do, blacksnday.