Welcome Guest, Not a member yet? Register   Sign In
How do I save anchor links in MySql DB ?
#5

[eluser]TWP Marketing[/eluser]
I don't believe you understand what I meant.

Your database is used to save four variables:

1) the text that the user enters
2) the text of the url segments, for instance: my_controller/the_function
3) the text which will appear at the anchor text. for instance: 'click here'
4) any attributes needed by the html <a> tag, for instance: a css class, image width and height etc.

You do NOT save the actual text of the CI anchor statement. That goes in your view file.

In your model you create a function to read the database record and pass that information to a view
In your view you will place the code to generate an html anchor statement. For instance, using CI I would use the anchor() helper function (as shown in my previous post).


Messages In This Thread
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 09:16 AM
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 11:05 AM
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 08:23 PM
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 08:35 PM
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 08:41 PM
How do I save anchor links in MySql DB ? - by El Forum - 07-21-2012, 09:45 PM
How do I save anchor links in MySql DB ? - by El Forum - 07-22-2012, 09:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB