Jump to content

Recommended Posts

How can I make this function that once you click the link in the code it takes you to a new page without html but so the menu_name and content load in it.

 

function public_navigation($sel_subject = null, $sel_page = null) {  
	$subject_set = get_all_subjects();
	// 5. Use returned data
	while ($subject = mysql_fetch_array($subject_set)) { 

	echo "<div class=\"menu-name\">";  echo "<a href=\"buying.php?page=" . urlencode($subject["id"]) .
		"\">{$subject["menu_name"]}</a>";  echo"</div>";
	echo "<div class=\"buying-text\">";  echo "{$subject["content"]}";  echo"</div>";

	echo "<div class=\"image\">"; echo"</div>";




	}
}

 

Thanks, Josh

Link to comment
https://forums.phpfreaks.com/topic/180499-function/
Share on other sites

Do you mean remove the other code and use this instead or add this in somewhere? Also is the bracket after the else meant to be a curly brace?

 

Yes you are correct it was meant to be a curly brace.

 

What my code is saying is, if there is a paramter in the URL the only display this data for the house in the URL, else there are no paramters in the URL so display the default list of all houses.

Link to comment
https://forums.phpfreaks.com/topic/180499-function/#findComment-952478
Share on other sites

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.