I am Newbie in PHP
My Problem It's Too Hard to Explain but i'll try its..
I have Two Text Fields
The First Text Field i call it "InputX", the amount of InputX is Constant,
and The Second Text Field I Call it "InputY", Generatable Field
I have the Button usefull for Generated "InputY" (so If I Click The Button It Will Produce amount of "InputY"). i call the
Button "AddRow"

I need to insert data from that form to the server, the script will save the value of Fields ("InputX" and INPUTY") by once
submit.
And the amount of value of data saved depent on how many "InputY" I have.
This The sample of Value Of The Fields will saved into the server, if user click 5x "AddRow's Button".
INPUTXVALUE INPUTYVALUE
INDEX SUB1
INDEX SUB2
INDEX SUB3
INDEX SUB4
INDEX SUBX
i have done before with my asp script. and it's Worked.
<%
i = 0
Inputx = request("Inputx")
dim vary(100)
for each y in request("InputY")
vary(i) = y
i = i + 1
next
for each x in request("inputY")
insertq = "Insert into Nsoftware(X, Y) values ('" & Inputx & "','" & vary(i) & "')"
set save = conn.execute(insertq)
i = i + 1
next
%>
I try this script with php, but i found an Error.
<?php
$vary(100);
$i = 0;
foreach($InputY as $y){
$vary($i) = $y;
$i++;
}
foreach($Nama_Software as $x){
$insertq = "Insert into NSoftware (X, Y) values ('$InputX','$vary($i)')";
echo $insertq."<br>";
mysql_query($insertq);
$i++;
}
Sorry it's to many CopyPasting..,

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

Reply via email to