troy
|
Posted: 03/27/2005, 6:11 PM |
|
hi there.
i am using ,CCS,PHP,MySQL,
i have built a multiRegistraction with four pages, and when i go to the first page and enter the information and click the next button i go to page two, but the buttons at the bottom show only the << prev button and not the next>> button.
when i preview both buttons can be seen, but when i test it live the next button donsnt show so i cant move to the next page.
i am faily new at CSS , so its must be something pretty simple.
thank you if anyone can help...
|
|
|
troy
|
Posted: 03/27/2005, 6:27 PM |
|
i think the problem is that the button witch is not showing is a update button... and im wanting to insert information,,,,,
|
|
|
troy
|
Posted: 03/27/2005, 8:24 PM |
|
hi there.
I gather there is no way to add data to a database , using a multi Registraction forms, I have tryed but failed, so there must be no way...
thanks for the replies,,,
|
|
|
peterr
Posts: 5971
|
Posted: 03/27/2005, 8:41 PM |
|
As you can see at http://examples.codecharge.com/ExamplePack/MultiStepReg...gistration1.php this works without problems.
The instructions are available at http://examples.codecharge.com/ExamplePack/MultiStepReg...ration_desc.php
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
troy
|
Posted: 03/27/2005, 11:51 PM |
|
thanks peter,,
i get a error saying Call to a member fuction on a non-object.
do i need a custom code to just add my data into database?
and if so do you no what it is?.
i dont want it for editing,,
i have built it the same way as in the example, but of course using my feilds in the data base.
the first from works but when i go to the next form, the next button has gone..
cheers..
|
|
|
peterr
Posts: 5971
|
Posted: 03/27/2005, 11:56 PM |
|
I am pretty sure that your data from 1st page is already added into database. Have you checked?
As for the next/2nd page of course you need to retrieve the record from the database before you can continue. Otherwise you'd create 2 different records.
You don't need custom code to add data into database, but you need custom code to find out what auto-incremented key your database created. That custom code is provided inside the example. Please review the instructions for that example in detail.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
troy
|
Posted: 03/28/2005, 12:06 AM |
|
hi peter.
yes the first page of data is in the data base,
i have tryed the code in the AfterInsert event as in the example.
global $Redirect;
//Retrieve the last inserted key if a new user is registered
//This method of retrieving the last inserted key is safe because the value of the user_login field has to be unique.
if(!CCGetFromGet("cust_id",0)) {
$LastID = CCDLookup("max(cust_id)","customers","cust_email=".$DBConnection1->ToSQL(CCGetFromPost("cust_email",""),ccsText),$DBConnection1);
if (strpos($Redirect,"?") == false ) {
$Redirect = $Redirect."?cust_id=".$LastID;
} else if (substr($Redirect,-1) == "?" ) {
$Redirect = $Redirect."cust_id=".$LastID;
} else {
$Redirect = $Redirect."&cust_id=".$LastID;
}
}
//End Custom Code
so there is another custom code in the example?, i will look for it.
cheers
|
|
|
troy
|
Posted: 03/28/2005, 2:42 AM |
|
hi there,
is this the right custom code to find out what auto-incremented key your database created:
global $Redirect;
//Retrieve the last inserted key if a new user is registered
//This method of retrieving the last inserted key is safe because the value of the user_login field has to be unique.
if(!CCGetFromGet("cust_id",0)) {
$LastID = CCDLookup("max(cust_id)","customers","cust_email=".$DBConnection1->ToSQL(CCGetFromPost("cust_email",""),ccsText),$DBConnection1);
if (strpos($Redirect,"?") == false ) {
$Redirect = $Redirect."?cust_id=".$LastID;
} else if (substr($Redirect,-1) == "?" ) {
$Redirect = $Redirect."cust_id=".$LastID;
} else {
$Redirect = $Redirect."&cust_id=".$LastID;
}
}
//End Custom Code
then i will no im on the right track,,,,
thank you.....
|
|
|
|