i can link from my home page

#2
[eluser]sofwan[/eluser]
for using anchor syntax, you need to insert "$this->load->helper('url');" in your controller or load it in your autoload.php, in array helper,
$autoload['helper'] = array("url");

Then, you can write echo anchor("class_name/function_name") in your view, for example in your case : echo anchor("welcome/contact us"). (Your url is not correct ("welcome/contact us"), "contact us", it's a function name, should not has a space, you can replace with anchor ("welcome/contactus") or anchor("welcome/contact_us");

echo anchor("welcome/contact_us")
--> welcome : Name of class in your controller
--> contact_us : Name of function in your controller.

It goes to the function if we click the url, if the function is not available, it shows us error 404.

Thank you.


Messages In This Thread
i can link from my home page - by El Forum - 03-26-2011, 08:38 PM
i can link from my home page - by El Forum - 03-26-2011, 10:37 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.