Facebook APP to create posts for fanpage stopped working - facebook

Im using a script, hosted on my server to create sheduled posts for a few facebook fanpages. Im the admin of the app but not the creator. The guys who created the script does not support the script anymore...
EDIT: By stopped working i mean - the process of the upload in the backend of the script runs as always, but the sheduled posts are not generated in facebook. Nothing there... Normally all the images should listed in my planned posts section of the fanpage. I cant find the error. The app is also not blocked.
The current app (facebook 2.0 API) uses submission for manage_pages and publish_pages. When i access the app and try to upload images, the fb entry dialog to the app shows up following Message:
Submit for Login Review
Some of the permissions below have not been approved for use by Facebook.
I submited a review for the app and get following answers for each submission:
for "publish_pages" & "manage_pages":
Your app needs permission for their current functionality. You may have to request another authorization or you can public_profile use the property for their use you need a separate authorization.
Notes From Your Reviewer:
You don’t need any extended permissions for an app that you admin. App admins, and any account listed as a ‘role’ in the App Settings page, can access all permissions without submitting for review. You only need to submit for review if the users/customers of your app are using the permissions to enhance their experience in-app
I already tried a dozen of tutorials, the publish_action submission and so on - no luck or not enough knowledge. Maybe the second one :)
Here is the index.php of the script: (Any help will be greatly appreciated!)
<?php
define('PATH', dirname(__file__));
session_start();
if(!isset($_SESSION['logged']) || $_SESSION['logged']!=true){
header("Location: login.php");
exit(0);
}
require_once(PATH . '/lang.php');
require_once(PATH . '/config.php');
require_once(PATH . '/createDatabase.php');
if(isset($_GET['id']) && is_numeric($_GET['id'])){
$db->delete("pages", "ID", $_GET['id']);
echo '<script type="text/javascript">
<!--
window.location = "index.php"
//-->
</script>';
exit(0);
}
require_once(PATH . '/header.php');
if (isset($_POST['rss'])) {
if(strlen($_POST['rss'])>5){
$db->insert("rss",array('url' => strip_tags($_POST['rss'])));
}
}
if(!function_exists('curl_init')){
echo '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorcurl'] . '
</div>';
exit(0);
}
if(!isset($idApp) || $idApp == ""){
echo '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorappid'] . '
</div>';
exit(0);
}
if(!isset($appSecret) || $appSecret == ""){
echo '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorappsecret'] . '
</div>';
exit(0);
}
if(!isset($canvasUrl) || $canvasUrl == ""){
echo '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorcanvas'] . '
</div>';
exit(0);
}
if(!isset($folder) || $folder == ""){
echo '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorfolder'] . '
</div>';
exit(0);
}
if(isset($_FILES["zip_file"]["name"])) {
$filename = $_FILES["zip_file"]["name"];
$source = $_FILES["zip_file"]["tmp_name"];
$type = $_FILES["zip_file"]["type"];
$name = explode(".", $filename);
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed');
foreach($accepted_types as $mime_type) {
if($mime_type == $type) {
$okay = true;
break;
}
}
$continue = strtolower($name[1]) == 'zip' ? true : false;
if(!$continue) {
$message = '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorzip'] . '
</div>';
}
$target_path = PATH . "/" . $folder . "/" .$filename; // change this to the correct site path
if(move_uploaded_file($source, $target_path)) {
$zip = new ZipArchive();
$x = $zip->open($target_path);
if ($x === true) {
$zip->extractTo(PATH . "/" . $folder . "/"); // change this to the correct site path
$zip->close();
unlink($target_path);
}
$message = '<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['successzip'] . '
</div>';
} else {
$message = '<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
' . $l['errorupload'] . '
</div>';
}
}
if(isset($_POST['deleteFolder'])){
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir."/".$object) == "dir") rmdir($dir."/".$object); else unlink($dir."/".$object);
}
}
reset($objects);
rmdir($dir);
}
}
if(is_dir(PATH . '/' . $_POST['deleteFolder'])){
rrmdir(PATH . '/' . $_POST['deleteFolder']);
}
}
?>
<div class="container-fluid">
<div class="row-fluid">
<hr>
<div id="tab" class="nav nav-pills pull-right" data-toggle="buttons-radio">
<?php echo $l['config'];?>
<?php echo $l['pages'];?>
<?php echo $l['posts'];?>
<?php echo $l['folders'];?>
<?php echo $l['liveposts'];?>
<?php echo $l['logout'];?>
</div>
<br clear="all" />
<div class="tab-content">
<div class="tab-pane active" id="prices2">
<br>
<div class="alert alert-info"><?php echo $l['configinfo'];?></div>
<p class="lead"><?php echo $l['config'];?></p>
<!--Body content-->
<legend><?php echo $l['configproblems'];?></legend>
<?php
if (count($db->selectAll("config"))>0) {
echo '<button class="btn btn-success">' . $l['youhavetoken'] . '</button>';
echo '<button class="btn btn-info">' . $l['renewtoken'] . '</button>';
} else {
echo '<button class="btn btn-info">' . $l['gettoken'] . '</button>';
}
?>
</div>
<div class="tab-pane" id="features2">
<br>
<div class="alert alert-info">
<?php echo $l['pagesinfo'];?>
</div>
<p class="lead"><?php echo $l['pages'];?></p>
<form class="form-horizontal" method="POST">
<fieldset>
<!-- Form Name -->
<legend><?php echo $l['addpages'];?></legend>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="page"><?php echo $l['pageurl'];?></label>
<div class="controls">
<input id="page" name="page" type="text" placeholder="https://www.facebook.com/your-page-url" class="input-xlarge" required="">
<p class="help-block"><?php echo $l['pageurl'];?></p>
</div>
</div>
<!-- Button -->
<div class="control-group">
<label class="control-label" for="add"></label>
<div class="controls">
<button id="add" name="add" class="btn btn-success"><?php echo $l['add'];?></button>
</div>
</div>
</fieldset>
</form>
<?php
if (isset($_POST['page'])) {
$resultToken = $db->selectAll("config");
if(isset($resultToken[0]['token']))
$token = $resultToken[0]['token'];
function getSslPage($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$info = json_decode(getSslPage('https://graph.facebook.com/' . $_POST['page'] . '?access_token=' . $token));
if(isset( $info->name)){
$album = json_decode(getSslPage('https://graph.facebook.com/' . $info->id . '/albums?fields=id&access_token=' . $token));
$fotoAlbum = "";
foreach ($album->data as $key => $value) {
if($fotoAlbum=="" || #$album->data[$key]->name == "Timeline Photos"){
$fotoAlbum = #$album->data[$key]->id;
}
}
$db->insert("pages",array('ID' => $info->id , 'url' => $info->name, 'idalbum' => $fotoAlbum));
unset($_POST);
}
}
$result = $db->selectAll("pages");
if(!empty($result)){
echo '<table class="table table-striped" id="example">
<thead>
<tr>
<td>' . $l['name'] . '</td>
<td>' . $l['id'] . '</td>
<td>' . $l['open'] . '</td>
<td>' . $l['delete'] . '</td>
</tr>
</thead>
<tbody>';
foreach ($result as $value){
echo '<tr><td>' , $value['url'] , '</td><td>' , $value['ID'] , '</td><td><a target="_blank" href="https://www.facebook.com/' , $value['ID'] , '">' . $l['open'] . '</a></td><td>' . $l['delete'] . '</td></tr>';
}
echo '</tbody></table>';
}
?>
</div>
<div class="tab-pane" id="folders">
<br>
<div class="alert alert-info"><?php echo $l['foldersinfo'];?></div>
<p class="lead"><?php echo $l['folders'];?></p>
<legend><?php echo $l['uploadzipfolders'];?></legend>
<?php if(isset($message)) echo "<p>$message</p>"; ?>
<form enctype="multipart/form-data" method="post" action="">
<label><?php echo $l['choosezip'];?>: <input type="file" name="zip_file" /></label>
<br />
<input type="submit" name="submit" value="<?php echo $l['upload'];?>" />
</form>
<legend><?php echo $l['deletefolder'];?></legend>
<form method="post" action="">
<select id="deleteFolder" name="deleteFolder" class="input-xlarge" required>
<?php
$folders = glob(PATH . '/' . $folder . "/*", GLOB_ONLYDIR );
foreach ($folders as $subfolder){
$subfolder = explode('/', $subfolder);
echo '<option value="' , $folder , '/', $subfolder[count($subfolder)-1] , '">' , $folder , '/', $subfolder[count($subfolder)-1] , '/' , '</option>';
}
?>
</select><br />
<input type="submit" name="submit" value="<?php echo $l['deletefolder'];?>" />
</form>
<legend><?php echo $l['uploadimagestofolder'];?></legend>
<select id="puthere" name="puthere" class="input-xlarge" required>
<?php
echo '<option value="' , $folder , '">' , $folder , ' (root) </option>';
$folders = glob(PATH . '/' . $folder . "/*", GLOB_ONLYDIR );
foreach ($folders as $subfolder){
$subfolder = explode('/', $subfolder);
echo '<option value="' , $folder , '/', $subfolder[count($subfolder)-1] , '">' , $folder , '/', $subfolder[count($subfolder)-1] , '/' , '</option>';
}
?>
</select>
<div id="file-uploader-demo1">
<noscript>
<p><?php echo $l['enablejavascript'];?></p>
<!-- or put a simple form for upload here -->
</noscript>
</div>
<div class="qq-upload-extra-drop-area"><?php echo $l['dropfiles'];?></div>
</div>
<div class="tab-pane" id="live">
<div class="alert alert-info"><?php echo $l['rssinfo'];?></div>
<form class="form-horizontal" method="POST">
<fieldset>
<!-- Form Name -->
<legend><?php echo $l['addyourrss'];?></legend>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="page"><?php echo $l['rssurl'];?></label>
<div class="controls">
<input id="rss" name="rss" type="text" placeholder="https://www.something.com/rss" class="input-xlarge" required="">
<p class="help-block"><?php echo $l['rssurl'];?></p>
</div>
</div>
<!-- Button -->
<div class="control-group">
<label class="control-label" for="add"></label>
<div class="controls">
<button id="add" name="add" class="btn btn-success"><?php echo $l['add'];?></button>
</div>
</div>
</fieldset>
</form>
<legend><?php echo $l['startpostlive'];?></legend>
<?php echo $l['startpostlive'];?>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['pickyourrss'];?></label>
<div class="controls">
<select id="urlRss" name="urlRss" class="input-xlarge" multiple required>
<?php
$result = $db->selectAll("rss");
if(!empty($result)){
foreach ($result as $value){
echo '<option value="' , $value['url'] , '">' , $value['url'] , '</option>';
}
}
?>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['pages'];?></label>
<div class="controls">
<select id="pageRss" name="pageRss" class="input-xlarge" multiple required>
<?php
$result = $db->selectAll("pages");
if(!empty($result)){
foreach ($result as $value){
echo '<option value="' , $value['ID'] , '">' , $value['url'] , '</option>';
}
}
?>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['timetocheck'];?></label>
<div class="controls">
<select id="timeRss" name="timeRss" class="input-xlarge" required>
<option value="5">5 <?php echo $l['minutes'];?></option>
<option value="10">10 <?php echo $l['minutes'];?></option>
<option value="15">15 <?php echo $l['minutes'];?></option>
<option value="20">20 <?php echo $l['minutes'];?></option>
<option value="30">30 <?php echo $l['minutes'];?></option>
<option value="45">45 <?php echo $l['minutes'];?></option>
<option value="60">60 <?php echo $l['minutes'];?></option>
</select>
</div>
</div>
<button id="startRss" name="startRss" class="btn btn-success"><?php echo $l['startposting'];?></button>
<button id="stopRss" name="stopRss" class="btn btn-info" style="display:none" onClick="window.location.reload()"><?php echo $l['stopposting'];?></button>
<div id="postsDone"></div>
</div>
<div class="tab-pane" id="requests2">
<br>
<p class="lead"><?php echo $l['posts'];?></p>
<form class="form-horizontal" onsubmit="return false;" id="formPosts">
<fieldset>
<div class="alert alert-info"><?php echo $l['postsinfo'];?></div>
<!-- Form Name -->
<legend><?php echo $l['generateposts'];?></legend>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['folder'];?></label>
<div class="controls">
<select id="subfolder" name="subfolder" class="input-xlarge" required>
<?php
echo '<option value="' , $folder , '">' , $folder , ' (root) </option>';
$folders = glob(PATH . '/' . $folder . "/*", GLOB_ONLYDIR );
foreach ($folders as $subfolder){
$subfolder = explode('/', $subfolder);
echo '<option value="' , $folder , '/', $subfolder[count($subfolder)-1] , '">' , $folder , '/', $subfolder[count($subfolder)-1] , '/' , '</option>';
}
?>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['pages'];?></label>
<div class="controls">
<select id="page" name="page[]" class="input-xlarge" multiple required>
<?php
$result = $db->selectAll("pages");
if(!empty($result)){
foreach ($result as $value){
echo '<option value="' , $value['ID'] , '">' , $value['url'] , '</option>';
}
}
?>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['usefilename'];?></label>
<div class="controls">
<select id="useimagename" name="useimagename" class="input-xlarge" required>
<?php
echo '<option value="0">' , $l['no'] , '</option>';
echo '<option value="1">' , $l['yes'] , '</option>';
?>
</select>
</div>
</div>
<!-- Select Basic -->
<div class="control-group">
<label class="control-label"><?php echo $l['deletefiles'];?></label>
<div class="controls">
<select id="deletefiles" name="deletefiles" class="input-xlarge" required>
<?php
echo '<option value="0">' , $l['no'] , '</option>';
echo '<option value="1">' , $l['yes'] , '</option>';
?>
</select>
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="control-group">
<label class="control-label"><?php echo $l['numberofposts'];?></label>
<div class="controls">
<label class="radio inline">
<input type="radio" name="numposts" value="10" checked="checked">
10
</label>
<label class="radio inline">
<input type="radio" name="numposts" value="25">
25
</label>
<label class="radio inline">
<input type="radio" name="numposts" value="50">
50
</label>
<label class="radio inline">
<input type="radio" name="numposts" value="100">
100
</label>
<label class="radio inline">
<input type="radio" name="numposts" value="250">
250
</label>
<label class="radio inline">
<input type="radio" name="numposts" value="500">
500
</label>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php echo $l['timefirstpost'];?></label>
<div class="controls">
<div id="datetimepicker1" class="input-append date">
<input data-format="dd/MM/yyyy hh:mm:ss" type="text" id="dataehora" name="dataehora" required></input>
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar">
</i>
</span>
</div>
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="control-group">
<label class="control-label"><?php echo $l['timebettweenpost'];?></label>
<div class="controls">
<label class="radio inline">
<input type="radio" name="time" value="2m">
2 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="3m">
3 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="5m" checked="checked">
5 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="10m">
10 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="15m">
15 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="20m">
20 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="30m">
30 <?php echo $l['minutes'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="1h">
1 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="2h">
2 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="3h">
3 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="4h">
4 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="5h">
5 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="6h">
6 <?php echo $l['hours'];?>
</label>
<label class="radio inline">
<input type="radio" name="time" value="12h">
12 <?php echo $l['hours'];?>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php echo $l['maxpostsperday'];?></label>
<div class="controls">
<div>
<input type="text" id="postsperday" name="postsperday"></input>
</div>
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="control-group">
<label class="control-label"><?php echo $l['from'];?></label>
<div class="controls">
<label class="radio inline">
<input type="radio" name="from" value="folder" checked="checked">
<?php echo $l['randomimages'];?>
</label>
<label class="radio inline">
<input type="radio" name="from" value="file">
<?php echo $l['file'];?>
</label>
</div>
</div>
<!-- Button -->
<div class="control-group">
<label class="control-label"></label>
<div class="controls">
<button id="generatePosts" name="singlebutton" class="btn btn-success"><?php echo $l['generate'];?></button>
</div>
</div>
</fieldset>
</form>
<div class="progress progress-striped active" style="display:none">
<div class="bar" style="width: 0%;"></div>
</div>
<div id="defaultText" style="display:none">
<input type="text" val="" class="text" />
<select class="input-xlarge" required>
<?php
echo '<option value="0">' , $l['begginingempty'] , '</option>';
echo '<option value="1">' , $l['endempty'] , '</option>';
echo '<option value="2">' , $l['begginingall'] , '</option>';
echo '<option value="3">' , $l['endall'] , '</option>';
?>
</select>
<button name="singlebutton" class="btn btn-success addDescription"><?php echo $l['add']; ?></button>
</div>
<ul class="thumbnails" id="listaposts">
</ul>
<br clear="all" />
<div class="alert alert-success sucessoPost" style="display:none">
<button type="button" class="close" data-dismiss="alert">×</button>
<?php echo $l['successposts'];?>
</div>
<div class="options" style="display:none">
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<?php echo $l['dontclose'];?>
</div>
<hr>
<button id="postall" name="singlebutton" class="btn btn-success"><?php echo $l['postall'];?></button>
<a onClick="window.location.reload()" name="singlebutton" class="btn btn-error"><?php echo $l['deleteall'];?></a>
</div>
</div>
</div>
</div>
</div>
<?php
require_once(PATH . '/footer.php');
?>

Related

update in codeigniter 3, it's run but database didnt changed

i dont understand with my code. it's run, and work. but when i see in database didnt changed.
here's my controller, function perbarui for get id data, get the data id from model (MMobil).
public function perbarui($id = NULL){
$this->load->model('merek');
$this->load->library('form_validation');
$data['merk'] = $this->merek->getList();
$data['detail'] = $this->MMobil->detail($id);
$submit = $this->input->post('submit');
print_r($data);
if ($submit) {
$nomor_kendaraan = $this->input->post('nomor_kendaraan');
$nomor_mesin = $this->input->post('nomor_mesin');
$id_merek = $this->input->post('id_merek');
$tahun_beli = $this->input->post('tahun_beli');
$nama_mobil = $this->input->post('nama_mobil');
$this->form_validation->set_rules('nama_mobil', 'Nama_Mobil', 'required');
$this->form_validation->set_rules('nomor_kendaraan', 'Nomor_Kendaraan', 'required');
$data['detik'] = $this->MMobil->setData($nomor_kendaraan, $nomor_mesin, $id_merek, $tahun_beli, $nama_mobil);
if ($this->form_validation->run() == FALSE) {
$data['errors'] = TRUE;
}else{
$data['detail'] = $this->MMobil->detail($id);
print_r($data);
}
//redirect('Master');
}
$this->load->view('master-detail-mobil', $data);
}
here's my models. function setData for storage variable after click submit. function edit get id data and get variable arrayData from function setData
public function setData($nomor_kendaraan, $nomor_mesin, $id_merek, $tahun_beli, $nama_mobil){
$this->nomor_kendaraan = $nomor_kendaraan;
$this->nomor_mesin = $nomor_mesin;
$this->id_merek = $id_merek;
$this->tahun_beli = $tahun_beli;
$this->nama_mobil = $nama_mobil;
}
public function edit($id){
$arrayData = array(
'nomor_kendaraan' => $this->nomor_kendaraan,
'nomor_mesin' => $this->nomor_mesin,
'id_merek' => $this->id_merek,
'tahun_beli' => $this->tahun_beli,
'nama_mobil' => $this->nama_mobil,
);
$this->db->where('nomor_mesin', $id);
return $this->db->update($this->table,$arrayData);
}
here's my views
<?php $this->load->view('header.php'); ?>
<?php
echo"<h4>UPDATE DATA</h4>";
?>
<form class="form-horizontal" role="form" method="post" action="<?php echo site_url()?>/Master/perbarui/">
<div class="form-group">
<label class="control-label col-sm-2" for="noken">Nomor Kendaraan :</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nomor_kendaraan" value="<?php
echo #$detail->nomor_kendaraan;
?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="nomes">Nomor Mesin :</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nomor_mesin" value="<?php
echo #$detail->nomor_mesin;
?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="merk">Merek Mobil :</label>
<div class="col-sm-10">
<select class="form-control" name="id_merek">
<?php foreach ($merk as $mrk) :?>
<option value="<?php echo $mrk->id_merek ?>">
<?php
echo $mrk->nama_merek;
?>
</option>
<?php endforeach?>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="thn">Tahun Beli :</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="tahun_beli" value="<?php
echo #$detail->tahun_beli; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="namo">Nama Mobil :</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="nama_mobil" value="<?php
echo #$detail->nama_mobil; ?>">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="nomes"></label>
<div class="col-sm-2">
<input type="submit" class="form-control" name="submit" value="simpan">
</div>
</div>
</form>
<?php $this->load->view('footer.php'); ?>
and here my pictures before click submit and after click submit. i typed print_r for see the data array. if you see data array detail before click submit, there is data in detail. but after click submit data array detail gone.
enter image description here enter image description here

Confirmation message in same page after submission

I buy a Dreamweaver template and it comes with a Form page.But when I submit the message it sends me to another page with only text in it.
So I want to change it, so it can display a message after the submit buttom.
This is the CONTACT FORM inserted in a HTML page:
<div class="col-sm-6 col-xs-12">
<div class="status alert alert-success contact-status"></div>
<form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="sendemail.php" role="form">
<div class="row">
<!-- Name Field Starts -->
<div class="col-md-6">
<div class="form-group">
<label for="name" class="sr-only">Nombre: </label>
<input type="text" class="form-control" name="name" id="name" required placeholder="NOMBRE">
</div>
</div>
<!-- Name Field Ends -->
<!-- Email Field Starts -->
<div class="col-md-6">
<div class="form-group">
<label for="email" class="sr-only">Correo Electrónico: </label>
<input type="text" class="form-control" name="email" id="email" required placeholder="EMAIL">
</div>
</div>
<!-- Email Field Ends -->
<!-- Phone No Field Starts -->
<div class="col-md-6">
<div class="form-group">
<label for="phoneno" class="sr-only">Teléfono: </label>
<input type="text" class="form-control" name="phoneno" id="phoneno" required placeholder="TELÉFONO (10 DÍGITOS)">
</div>
</div>
<!-- Phone No Field Ends -->
<!-- Message Field Starts -->
<div class="col-xs-12">
<div class="form-group">
<label for="message" class="sr-only">Mensaje: </label>
<textarea class="form-control" rows="8" name="message" id="message" required placeholder="MENSAJE"></textarea>
</div>
</div>
<!-- Message Field Ends -->
<div class="col-xs-12">
<input type="submit" class="btn btn-lg btn-block btn-secondary text-uppercase" value="Enviar Mensaje">
</div>
</div>
</form>
</div>
<!-- Contact Form Ends -->
And this is the sendemail.php
<?php
header('Content-type: application/json');
$status = array(
'type'=>'success',
'message'=>'Email sent!'
);
$name = #trim(stripslashes($_POST['name']));
$email = #trim(stripslashes($_POST['email']));
$phoneno = #trim(stripslashes($_POST['phoneno']));
$subject = #trim(stripslashes($_POST['subject']));
$message = #trim(stripslashes($_POST['message']));
$email_from = $email;
$email_to = 'myemail#domain.com';
$body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Phone NO: ' . $phoneno . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message;
$success = #mail($email_to, $subject, $body, 'From: <'.$email_from.'>');
echo json_encode($status);
die;
?>
Hopping you can help me

Codeigniter Controller cannot get the input post values

Hy, I have problem with codeigniter. My controller can't get the values from my view. Here is the code
Controller
public function konfirmasi_pembayaran() {
$data['data_penumpang_bayi'] = $this->input->post("data_penumpang_bayi");
if($data['data_penumpang_bayi'] > 0){
for ($i = 1; $i <= $data['data_penumpang_bayi']; $i++) {
$data['ortu_bayi'. $i] = $this->input->post("ortu_bayi". $i);
$data['nationality_bayi'. $i] = $this->input->post("nationalitybayi". $i);
$data['name_bayi' . $i] = $this->input->post("namebayi" . $i);
$data['titel_bayi' . $i] = $this->input->post("titelbayi" . $i);
$data['lastname_bayi' . $i] = $this->input->post("lastnamebayi" . $i);
$data['date_birth_bayi' . $i] = $this->input->post("datebirthbayi" . $i);
}
}
$this->load->view("flight/konfirmasi_pembayaran_page", $data);
}
View
<div class="control-group">
<label class="control-label">Titel<span class="required">*</span></label>
<div class="controls">
<select class="span6 m-wrap" name="titelbayi<?php echo $i ?>">
<option value="">Pilih Titel...</option>
<?php foreach ($json_data->required->titlei1->resource as $value) {
?>
<option value="<?php echo $value->id ?>"><?php echo $value->name ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">Nama Depan<span class="required">*</span></label>
<div class="controls">
<input type="text" value="" name="namebayi<?php echo $i ?>" data-required="1" class="span6 m-wrap"/>
<input type="hidden" name="data_penumpang_bayi" value="<?php echo $data_penumpang_bayi ?>"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Nama Belakang<span class="required">*</span></label>
<div class="controls">
<input type="text" value="" name="lastnamebayi<?php echo $i ?>" data-required="1" class="span6 m-wrap"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Tanggal Lahir<span class="required">*</span></label>
<div class="controls">
<input id="date_birth" placeholder="(ex.1970-10-10)" data-date-format="yyyy-mm-dd" name="datebirthbayi<?php echo $i ?>" class="m-wrap m-ctrl-medium date-picker" size="16" type="text" value="" />
</div>
</div>
<div class="control-group">
<label class="control-label">Kewarganegaraan<span class="required">*</span></label>
<div class="controls">
<select class="span6 chosen-with-diselect" name="nationalitybayi<?php echo $i ?>">
<option value="">Pilih Kewarganegaraan...</option>
<?php
$contents = file_get_contents('https://api.master18.tiket.com/general_api/listCountry?output=json&token=' . $token . '');
$data = json_decode($contents);
foreach ($data->listCountry as $key) {
?>
<option <?php if ($key->country_id == "id") { ?> selected="selected" <?php } ?> value="<?php echo $key->country_id; ?>"><?php echo $key->country_id; ?>, <?php echo $key->country_name; ?></option>
<?php
}
?>
</select>
</div>
</div>
The controller code cannot get the values from previous view. What's wrong with my code ?
Any answer will be really appreciated. Sorry for my bad english
Thank you.
In your html code example, there is no form and no submit button. How are you posting ?
the concept in codeigniter (or any other MVC frameworks) for filling in a form, submit the form and get a resultpage is:
create a view page with form and submit button.
The submit button's action calls your controller function
in the controller function you can do something with your POST data
send back $data with $this->load->view('your_view',$data')
you can find a tutorial here (skip the validation part): http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html#tutorial
hope that helps!

HTML/PHP Form Formatting Error

im new so don't go to hard on me here. I'm trying to make this registration form into two rows but every time i try it does not post all the values from both rows of the form, just the first.
http://i.stack.imgur.com/TSnjl.png
<table width="990" border="0">
<tr>
<td width="486" height="221"><form id='register' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
<fieldset >
<legend>Register</legend>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<div class='short_explanation'>* required fields</div>
<input type='text' class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>' />
<div class="container"><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span>
<label for='name' >Your First Name*: </label>
<br/>
<input type='text' name='name' id='name' value='<?php echo $fgmembersite->SafeDisplay('name') ?>' maxlength="50" />
<br/>
</div>
<div class='container'>
<label for='lastname' >Your Last Name*: </label>
<br/>
<input type='text' name='lastname' id='lastname' value='<?php echo $fgmembersite->SafeDisplay('lastname') ?>' maxlength="50" />
<br/>
<span id='register_name_errorloc' class='error'></span> </div>
<div class='container'>
<label for='email' >Email Address*:</label>
<br/>
<input type='text' name='email' id='email' value='<?php echo $fgmembersite->SafeDisplay('email') ?>' maxlength="50" />
<br/>
<span id='register_email_errorloc' class='error'></span> </div>
<div class='container'>
<label for='username' >UserName*:</label><br/>
<input type='text' name='username' id='username' value='<?php echo $fgmembersite->SafeDisplay('username') ?>' maxlength="50" /><br/>
<span id='register_username_errorloc' class='error'></span>
<br/>
<span id='register_username_errorloc' class='error'></span> </div>
<div class='container' style='height:80px;'>
<label for='password' >Password*:</label>
<br/>
<div class='pwdwidgetdiv' id='thepwddiv' ></div>
<noscript>
<input type='password' name='password' id='password' maxlength="50" />
</noscript>
<div id='register_password_errorloc' class='error' style='clear:both'></div>
</div>
<input type='text' class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>2' />
<div class="container">
<p><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span>
<label for='phonenumber' >Phone Number: </label>
<br/>
<input type='text' name='phonenumber' id='phonenumber' value='<?php echo $fgmembersite->SafeDisplay('phonenumber') ?>' maxlength="15" />
<br/>
</p>
</div>
<div class='container'>
<label for='address' >Address: </label>
<br/>
<input type='text' name='address' id='address' value='<?php echo $fgmembersite->SafeDisplay('address') ?>' maxlength="40" />
<br/>
</div>
<div class='container'>
<label for='city' >City:</label>
<br/>
<input type='text' name='city' id='city'value='<?php echo $fgmembersite->SafeDisplay('city') ?>' maxlength="20">
<br/>
</div>
<div class='container'>
<label for='State' >State:</label>
<br/>
<input type='text' name='state' id='state' value='<?php echo $fgmembersite->SafeDisplay('state') ?>' maxlength="2" />
</div>
<div class='container'>
<label for='State' >Country:</label>
<br/>
<input type='text' name='country' id='country' value='<?php echo $fgmembersite->SafeDisplay('country') ?>' maxlength="3" />
<br/>
</div>
<div class='container' style='height:80px;'>
<p>
<label for='zip' >ZipCode:</label>
<br/>
<input type='text' name='zipcode' id='zipcode' value='<?php echo $fgmembersite->SafeDisplay('lastname') ?>' maxlength="5" />
</p>
<div class='container'>
<input type='submit' name='Submit' value='Submit' />
</div>
<p> </p>
</div>
</fieldset>
</form></td>
<td width="494" valign="top"><h2> </h2></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
I think possible the error is in the way u use double quotes and single quotes.
value='<?php echo $fgmembersite->SafeDisplay('username') ?>'
should be changed to
value="<?php echo $fgmembersite->SafeDisplay('username') ?>"
Could you report back to me what happens if you do this in all the cases

Magento: Why doesn't login and registration forms validation work when combined on one page

EDIT 051012:
Turns out that the issue was less to do with the forms being on one page but more to conflicts between prototype and jQuery; there was a inclusion of jQuery right at the bottom of the footer which was not set to no conflict. I simply added this after the inclusion of that particular jQuery:
<script type="text/javascript">
//<![CDATA[
$.noConflict();
//]]>
</script>
I'm accepting Pavel Novitsky's answer below because he mentioned, "If assuming that you have no form embedding or JavaScript errors your code should work.." and that made me realize that it might have something to do with Javascript.
I'm currently building an e-commerce site with Magento which requires for both the registration and login forms to sit on one page.
I have successfully integrated both forms on a single page but was not able to login or register.
Here's a very brief overview of how the forms are structured
<!--registration-->
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
<!--// form input fields go here-->
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('form-validate', true);
//]]>
</script>
<!--login-->
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
<!--// form input fields go here-->
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('form-validate', true);
//]]>
</script>
I noticed that the variable dataForm was being defined twice over so I switched one of them to dataForm02 to see if the submissions would go through - neither did. So after almost 6 hours of prodding, I decided to remove the javascript validation and to my surprise, the submission on both forms worked.
Does anyone have an idea why this is happening? It is good that I got the submissions on both forms through but this is definitely not ideal because there'd be no form of validations employed on the 2 forms. I'm close to throwing my computer out my 20th storey apartment.
you have one and the same form action for both login and register forms:
<?php echo $this->getPostActionUrl() ?>
This method is defined in different blocks for templates.
If assume that you have no form embedding or JavaScript errors your code should work.Hard to say something without real code.
Just one guess: do you have
//<![CDATA[
var dataForm = new VarienForm('login-form', true);
//]]>
or
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('login-form', true);
//]]>
</script>
?
Make sure you are using different id for forms in both registration and login forms and also make sure you are using same id in scripts. Seems like you have problem with login form ids. Use this for your login script.
<!--login-->
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="login-form">
<!--// form input fields go here-->
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('login-form', true);
//]]>
</script>
You can alternatively using xml you can achieve this functionality. Just you will need to edit customer.xml file. Replace with this one.
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
</customer_account_login>
Replace your theme/template/presistent/customer/form/register.phtml with this code and let me know the result.
<?php $login = new Mage_Customer_Block_Form_Login(); ?>
<div class="account-login">
<div class="page-title">
<h1><?php echo $login->__('Login or Create an Account') ?></h1>
</div>
<?php //echo $login->getMessagesBlock()->getGroupedHtml() ?>
<form action="<?php echo $login->getPostActionUrl() ?>" method="post" id="login-form">
<div class="col2-set">
<div class="col-1 new-users">
<div class="content">
<h2><?php echo $login->__('New Customers') ?></h2>
<p><?php echo $login->__('By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.') ?></p>
</div>
</div>
<div class="col-2 registered-users">
<div class="content">
<h2><?php echo $login->__('Registered Customers') ?></h2>
<p><?php echo $login->__('If you have an account with us, please log in.') ?></p>
<ul class="form-list">
<li>
<label for="email" class="required"><em>*</em><?php echo $login->__('Email Address') ?></label>
<div class="input-box">
<input type="text" name="login[username]" value="<?php echo $login->htmlEscape($login->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $login->__('Email Address') ?>" />
</div>
</li>
<li>
<label for="pass" class="required"><em>*</em><?php echo $login->__('Password') ?></label>
<div class="input-box">
<input type="password" name="login[password]" class="input-text required-entry validate-password" id="pass" title="<?php echo $login->__('Password') ?>" />
</div>
</li>
<?php echo $login->getChildHtml('form.additional.info'); ?>
<?php echo $login->getChildHtml('persistent.remember.me'); ?>
</ul>
<?php echo $login->getChildHtml('persistent.remember.me.tooltip'); ?>
<p class="required"><?php echo $login->__('* Required Fields') ?></p>
</div>
</div>
</div>
<div class="col2-set">
<div class="col-1 new-users">
<div class="buttons-set">
<button type="button" title="<?php echo $login->__('Create an Account') ?>" class="button" onclick="window.location='<?php echo Mage::helper('persistent')->getCreateAccountUrl($login->getCreateAccountUrl()) ?>';"><span><span><?php echo $login->__('Create an Account') ?></span></span></button>
</div>
</div>
<div class="col-2 registered-users">
<div class="buttons-set">
<?php echo $login->__('Forgot Your Password?') ?>
<button type="submit" class="button" title="<?php echo $login->__('Login') ?>" name="send" id="send2"><span><span><?php echo $login->__('Login') ?></span></span></button>
</div>
</div>
</div>
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
<input name="context" type="hidden" value="checkout" />
<?php endif; ?>
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('login-form', true);
//]]>
</script>
</div>
<div class="account-create">
<div class="page-title">
<h1><?php echo $this->__('Create an Account') ?></h1>
</div>
<?php echo $this->getChildHtml('form_fields_before')?>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
<div class="fieldset">
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
<ul class="form-list">
<li class="fields">
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
</li>
<li>
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
<div class="input-box">
<input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
</div>
</li>
<?php if ($this->isNewsletterEnabled()): ?>
<li class="control">
<div class="input-box">
<input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
</div>
<label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
</li>
<?php endif ?>
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
<?php if ($_dob->isEnabled()): ?>
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
<?php endif ?>
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
<?php if ($_taxvat->isEnabled()): ?>
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
<?php endif ?>
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
<?php if ($_gender->isEnabled()): ?>
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
<?php endif ?>
</ul>
</div>
<?php if($this->getShowAddressFields()): ?>
<div class="fieldset">
<input type="hidden" name="create_address" value="1" />
<h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
<ul class="form-list">
<li class="fields">
<div class="field">
<label for="company"><?php echo $this->__('Company') ?></label>
<div class="input-box">
<input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
</div>
</div>
<div class="field">
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
<div class="input-box">
<input type="text" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" />
</div>
</div>
</li>
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
<li class="wide">
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
<div class="input-box">
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />
</div>
</li>
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
<li class="wide">
<div class="input-box">
<input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i ?>" class="input-text <?php echo $_streetValidationClass ?>" />
</div>
</li>
<?php endfor; ?>
<li class="fields">
<div class="field">
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
<div class="input-box">
<input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" />
</div>
</div>
<div class="field">
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
<div class="input-box">
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
</select>
<script type="text/javascript">
//<![CDATA[
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
//]]>
</script>
<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
</div>
</div>
</li>
<li class="fields">
<div class="field">
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
<div class="input-box">
<input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
</div>
</div>
<div class="field">
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
<div class="input-box">
<?php echo $this->getCountryHtmlSelect() ?>
</div>
</div>
</li>
</ul>
<input type="hidden" name="default_billing" value="1" />
<input type="hidden" name="default_shipping" value="1" />
</div>
<?php endif; ?>
<div class="fieldset">
<h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
<ul class="form-list">
<li class="fields">
<div class="field">
<label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
<div class="input-box">
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
</div>
</div>
<div class="field">
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
<div class="input-box">
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
</div>
</div>
</li>
<?php echo $this->getChildHtml('form.additional.info'); ?>
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
</ul>
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
</div>
<div class="buttons-set">
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
<p class="back-link"><small>« </small><?php echo $this->__('Back') ?></p>
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
</div>
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
<input name="context" type="hidden" value="checkout" />
<?php endif; ?>
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('form-validate', true);
<?php if($this->getShowAddressFields()): ?>
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
<?php endif; ?>
//]]>
</script>
</div>