Missing Link and connection

Hi All

my php programer has left, so i’m picking up where he left of. There is a connectivity between DB is broken i guess.

If you could have a quick look and let me know what you think would be a big help

require('client.inc.php');

$thisclient = UserAuthenticationBackend::getUser();
if($thisclient && $thisclient->getId() && $thisclient->isValid()){
     $thisclient->refreshSession();
	 Http::redirect('tickets.php');
}
?>

<?php require_once('Connections/ost_connect.php'); ?>
<?php require_once('Connections/svagkaya.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}





?>

						
						
<?php
$section = 'home';
$nav->setActiveNav('pricing');
require(CLIENTINC_DIR.'header.inc.php');
?>						
						
<section id="contact">
	<div class="container">
		<div class="col-md-8" style="margin-top: 50px">
						<?php
							if ($plan != 1 && !isset($valid_res)) {
						?>
					
						<form method="POST" action="<?php echo $editFormAction; ?>" name="add_user" class="form-horizontal">
							<?php csrf_token(); ?>
							<h1>Sign Up</h1><br />
							<div class="form-group">
								<label class="col-sm-2 control-label">Plan Name</label>
								<div class="col-sm-6">
									<input type="text" name="plan_name" class="form-control" value="<?php echo $row_cust_plan['plan_name']; ?>" readonly required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">Plan value</label>
								<div class="col-sm-6">
									<input type="text" name="plan_value" class="form-control" value="$<?php echo $row_cust_plan['plan_value']; ?>" readonly required>
								</div>

why are you doing this?

What problem are you trying to solve? That is, it’s very difficult to suggest where the problem might be if we have no idea of what it actually is. What doesn’t work the way it should?

It is supposed to pick up a value from the DB and display in the website form to proceed further. Please see the code below, i guess there is a broken link after this coding.
Check this
"<?php if ($plan != 1 && !isset($valid_res)) { ?>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.