Jump to content

Recommended Posts

In this if/else function (below), how can I put some space between "Success! Payment Complete!" and "Go To Display". When it shows up on the web page those two lines are stacked right on top of each other. How do I put some space between them? Thanks

 

	if ($query1 && $query) {
$result = "Success! Payment Complete!";
	$rlink = "search.php";
	//$rlink = "search.php?".$slink;
	$rtitle = "Go To Display";
}else{
	$result = "There was a problem processing your request. Try again later or";
	$rlink = "page.php?page=2";
	$rtitle = "Contact Support";
}
}

Thanks for that reply.

 

I tried this: $result = "Success! Payment Complete!"<br><br>;

 

and I tried this:

$result = "Success! Payment Complete!";
<br><br>
	$rlink = "search.php";
	//$rlink = "search.php?".$slink;
	$rtitle = "Go To Display";

Both were unsuccessful.

Thanks for your reply. Here is the page of code:

 

<?php
session_start();
//CHECK IF FORM SUBMITTED
if ($_POST['submitted'] == 'yes') {

$pages = $_POST['id'];
if (!isset($_POST['id'])) {
echo "<script>document.location.href='index.php'</script>";
die();
}

$skey = $_SESSION['searched'];


if ($_POST['user_id'] != "") {
      		$member_id = $_POST['user_id'];
    	}

if ($_POST['ttl'] != "") {
      		$total = $_POST['ttl'];
    	}


}

foreach ($pages as $vid) {

     $my_db_info[] = $vid;

}



include_once ('classes/config.php');
include_once ('classes/functions.inc.php');
$member_credits = get_member_credits($member_id);

$balance = $member_credits - $total;

if ($member_credits >= $total && $balance >= 0) {

for( $x = 0; $x < sizeof( $my_db_info ); ++$x) {

       $sql = "INSERT INTO credits_temp ( mem_id, vid_id ) VALUES ( $member_id, $my_db_info[$x] )";
       $query = @mysql_query($sql);

}
$sql1 = "UPDATE credits SET total_credits=$balance where user_id=$member_id"; //subtract credits
$query1 = mysql_query($sql1);

if ($query1 && $query) {
	$result = "Success! Payment Complete!<br><br>";
	$rlink = "search.php";
	//$rlink = "search.php?".$slink;
	$rtitle = "Go To Display";
}else{
	$result = "There was a problem processing your request. Try again later or";
	$rlink = "page.php?page=2";
	$rtitle = "Contact Support";
}

} else{
	$error = "You do not have enough credits. To purchase credits, ";
	$rlink = "credits.php";
	$rtitle = "Click Here";
}



$template		= "themes/$user_theme/templates/main_1.htm";
$inner_template1 	= "themes/$user_theme/templates/inner_buy.htm";			//middle of page
$TBS 			= new clsTinyButStrong;
$TBS->NoErr		= true;											// no more error message displayed.

$TBS->LoadTemplate("$template");
$TBS->MergeBlock('mp', $members_full);

$TBS->Render	= TBS_OUTPUT;
$TBS->Show();
@mysql_close();

die();

/*

// show "nothing to show" empty arrays
if (empty($result_featured)) {
$show_v = 1;

} else {
$show_v = 2;
}

// display results
$template		= "themes/$user_theme/templates/main_1.htm";
$inner_template1 	= "themes/$user_theme/templates/inner_buy.htm";			//middle of page
$TBS 			= new clsTinyButStrong;
$TBS->NoErr 	= true;											// no more error message displayed.

$TBS->LoadTemplate("$template");
$TBS->MergeBlock('blkfeatured', $result_featured);

$TBS->Render 	= TBS_OUTPUT;
$TBS->Show();

@mysql_close();

die();

*/



?>

Ahh, so it now all becomes clear. 

 

You are using some form of templating system, so this is why, when you stick in a

into a string, it appears translated to the html entities rather than getting the effect of having the embedded tag.

 

For templating systems, the markups is suppossed to be in the templates.  We would need to know more about your template engine to help at this juncture, but it seems that spacing should be handled in the template itself, or in your .css, not by trying to inject blank line markup into the result string.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.