i tried $HTTP_GET already
my server is current...
print_r($_GET) gives me this:
Array ( )
on odd browser wouldn't have anything to do with this, would it? NetCaptor...?
i tried $HTTP_GET already
my server is current...
print_r($_GET) gives me this:
Array ( )
on odd browser wouldn't have anything to do with this, would it? NetCaptor...?
i just took out all references to the SubscriberID field in the script and it still didn't write to the table, so i have a problem elsewhere...
could it be that it didn't work because the script was not on the same page as the link referred to?
autoreg.htm?SubscriberID=".$SubsciberID
whiile the script was tucked away on autoprocess.php...?
if this helps any when you auto incr i think you also have to index that field
Hi glenn1137,
that's true, if the insertion query is on autoprocess.php you'll have to get the ID there either by putting it in a session where you can access it from every script or by moving it through the chain of scripts as GET or POST values. But
But you might need to rename autoreg.htm to autoreg.php.
Thomas
well, i did this: i renamed autoreg.htm to .php, i stuck a php session in the form with a $subscriberID=$_GET[]; and I echoed a hidden field <input type=hidden name="subscriberID" value="$SubscriberID"> to catch the variable and pass it to autoprocess.php, but then my damn first form quit passing the variable to the url - it NOW keeps passing "0", and i don't know why it started that... i still bet it has something to do with the indices and the primaries, since i recreated the Cars table (that's when the subscribers table quite returning the auto inc.).
so i'm willing to bet i can insert a hidden field in the second form to catch the auto inc. integer when i can get my damn tables to work properly...
care to look at my tables again?
danke, herr thomas
Hi,
to ease up thinks a little bit mor I'd suggest that you post all scripts and the most recent create statement for the tables so I can look at it step by step. Since there passed some hours since yesterday my head should now be clear enough
I was a little bit out of sync (regarding the order in which the scripts were requested and what was supposed to happen when) yesterday at the end of our conversation
before i was having trouble getting more than one record to be written to Cars, remember? so now i have that fixed by recreating the table. when i did that the .php?subscriberID="$subscriberID quit passing the int., it jsut passes a "0" now...
what i tried to do in autoreg.php was
<?
$subscriberId=$_GET["subscriberID"];
echo "<input type=\"hidden\" name=\"subscriberID...
?>
so that the value would be passed to the autoprocess.php normally along with the rest of the values, but then the other script broke on me...
thanks for your help, thomas,
glenn nall
CREATE TABLE subscribers
(
SubscriberID
int(11) unsigned NOT NULL auto_increment,
name
text NOT NULL,
street
text NOT NULL,
city
text NOT NULL,
state
text NOT NULL,
zip
text NOT NULL,
phone1
text NOT NULL,
phone2
text NOT NULL,
email1
text NOT NULL,
email2
text NOT NULL,
rec1name
text NOT NULL,
rec1Street
text NOT NULL,
rec1City
text NOT NULL,
rec1State
text NOT NULL,
rec1Zip
text NOT NULL,
rec1HomeTel
text NOT NULL,
rec1CellTel
text NOT NULL,
rec1Email1
text NOT NULL,
rec1Email2
text NOT NULL,
rec1Fax
text NOT NULL,
rec1Pager
text NOT NULL,
rec1OCI
text NOT NULL,
rec2Name
text NOT NULL,
rec2Street
text NOT NULL,
rec2City
text NOT NULL,
rec2State
text NOT NULL,
rec2Zip
text NOT NULL,
rec2HomeTel
text NOT NULL,
rec2CellTel
text NOT NULL,
rec2Email1
text NOT NULL,
rec2Email2
text NOT NULL,
rec2Fax
text NOT NULL,
rec2Pager
text NOT NULL,
rec2OCI
text NOT NULL,
prefContact1
text NOT NULL,
prefContact2
text NOT NULL,
prefBegTime
text NOT NULL,
prefEndTime
text NOT NULL,
noPrefTime
text NOT NULL,
directContact
text NOT NULL,
password
text NOT NULL,
refID
text,
howHeard
text,
amountSent
text NOT NULL,
agree
text NOT NULL,
PRIMARY KEY (SubscriberID
),
KEY SubscriberID
(SubscriberID
)
REATE TABLE Cars
(
SubscriberID
int(11) unsigned NOT NULL default '1',
veh1Owner
text NOT NULL,
veh1Make
text NOT NULL,
veh1Model
text NOT NULL,
veh1Color
text NOT NULL,
veh1Style
text NOT NULL,
veh1License
text NOT NULL,
veh1ODC
text NOT NULL,
veh2Owner
text NOT NULL,
veh2Make
text NOT NULL,
veh2Model
text NOT NULL,
veh2Color
text NOT NULL,
veh2Style
text NOT NULL,
veh2License
text NOT NULL,
veh2ODC
text NOT NULL,
veh3Owner
text NOT NULL,
veh3Make
text NOT NULL,
veh3Model
text NOT NULL,
veh3Color
text NOT NULL,
veh3Style
text NOT NULL,
veh3License
text NOT NULL,
veh3ODC
text NOT NULL,
field1
text NOT NULL,
field2
text NOT NULL,
field3
text NOT NULL
Hi glenn,
I hope I get the point:
In autoreg.php you might try to change:
$subscriberID=$_GET['SubscriberID'];
echo "<input type=\"hidden\" name=\"subscriberID\" value=\"$subscriberID\">\n";
instead of
$subscriberID=mysql_insert_id();
echo "<input type=\"hidden\" name=\"subscriberID\" value=\"$subscriberID\">\n";
since as far as I understood you redirect to autoreg.php from the previous script so you might need to access the variable as $_GET...
One more point. In the zip file the autoreg file still has the extension htm. But I think you already renamed it to autoreg.php because the redirect leds to autoreg.php, just to make it sure
One more point (agains has nothing to do with your problem but could led to problems:
It might be better to place the form and hidden input at the very beginning of the content just after the <body...> tag
<body..>
<form enctype='multipart/form-data' action='autoprocess.php' method='post'>
<?
$subscriberID=mysql_insert_id();
echo "<input type=\"hidden\" name=\"subscriberID\" value=\"$subscriberID\">\n";
?>
Because some browsers will have problems with inputs being printed between table tags, e.g.
<td...
<input type="hidden"...>
<table...>
yeah, i did the $_GET[]; there in autoreg.php. But as i say, i have no idea if it'll work since i can't get the process.php to pass the variable...
roger on the form and body tags...
thanks. can't figure out why the thing quit returning the int.
glenn