473,785 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

text input with links, etc..

Hi All,
I hope you can give me a few pointers on this issue.

I'd like visitors to my website to be able to enter text to be viewed on the
site - a bit like a bulletin board or forum. I can do this for regular text
easily by simply populating a 'TEXT' field within my MySQL database and
grabbing it back when rendering the site using PHP. However, I'd also like
visitors to be able to put in URL links or email items that can be clicked.
How would I go about doing this?.I've seen this sort of thing on forums
where words can be selected and a URL applied, but I have no idea how to do
this and how this information (ie. the link and the associated text) would
be stored in the database field(s).
Any ideas?. Are there any PHP examples available for this sort of thing?.

Thanks for any comments.

Regards,
Dave

Jul 17 '05 #1
4 1426
Dave Moore wrote:
Hi All,
I hope you can give me a few pointers on this issue.

I'd like visitors to my website to be able to enter text to be viewed on the
site - a bit like a bulletin board or forum. I can do this for regular text
easily by simply populating a 'TEXT' field within my MySQL database and
grabbing it back when rendering the site using PHP. However, I'd also like
visitors to be able to put in URL links or email items that can be clicked.
How would I go about doing this?.I've seen this sort of thing on forums
where words can be selected and a URL applied, but I have no idea how to do
this and how this information (ie. the link and the associated text) would
be stored in the database field(s).
Any ideas?. Are there any PHP examples available for this sort of thing?.


IMHO the easiest way is to allow users to use HTML-tags, that way they can set
URLs.

I think there are quite a lot of examples around the net, you can even take a
look at the online manual

http://www.php.net/manual/en/function.mysql-connect.php
http://www.php.net/manual/en/functio...etch-array.php
http://www.php.net/manual/en/function.mysql-query.php

To catch the sent data, you can use $_REQUEST['text-name'] to get the data
from the form.
//Aho
Jul 17 '05 #2
Thanks Aho, but that's not what I'm trying to achieve.

"J.O. Aho" <us**@example.n et> wrote in message
news:3h******** ****@individual .net...
Dave Moore wrote:
Hi All,
I hope you can give me a few pointers on this issue.

I'd like visitors to my website to be able to enter text to be viewed on the site - a bit like a bulletin board or forum. I can do this for regular text easily by simply populating a 'TEXT' field within my MySQL database and
grabbing it back when rendering the site using PHP. However, I'd also like visitors to be able to put in URL links or email items that can be clicked. How would I go about doing this?.I've seen this sort of thing on forums
where words can be selected and a URL applied, but I have no idea how to do this and how this information (ie. the link and the associated text) would be stored in the database field(s).
Any ideas?. Are there any PHP examples available for this sort of
thing?.
IMHO the easiest way is to allow users to use HTML-tags, that way they can set URLs.

I think there are quite a lot of examples around the net, you can even take a look at the online manual

http://www.php.net/manual/en/function.mysql-connect.php
http://www.php.net/manual/en/functio...etch-array.php
http://www.php.net/manual/en/function.mysql-query.php

To catch the sent data, you can use $_REQUEST['text-name'] to get the data
from the form.
//Aho

Jul 17 '05 #3
Dave Moore wrote:
Thanks Aho, but that's not what I'm trying to achieve.


So it's not that you have a page with a text filed where users can write
something and the submit and your php page take the text written and stores
it in a mysql database which later on can be displayed on another page?

//Aho
Jul 17 '05 #4

"J.O. Aho" <us**@example.n et> wrote in message
news:3h******** ****@individual .net...
Dave Moore wrote:
Thanks Aho, but that's not what I'm trying to achieve.
So it's not that you have a page with a text filed where users can write
something and the submit and your php page take the text written and

stores it in a mysql database which later on can be displayed on another page?


Well Yes and No. I can already do this using the functions you highlighted
in your previous post. What I'd like to do in addition is to allow the user
(some how) to include hypertext links in with their text such that when the
information is rendered, visitors can click on the links and navigate to
other pages. I assume that some sort of special form would be required to do
this and I'd like to see some example code.

Dave
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1429
by: Eddy Stone | last post by:
I would like to be able to use a text input field on my homepage as a way of navigating to other pages within my website... For example, if I typed "diary" into the text field (and pressed submit) it would take me to www.mywebsite.com/diary.htm.... Is there any easy way to do this ?
4
2753
by: multimatum2 | last post by:
Hello, I need to enable/disable input text forms... But... I need to have the same style (color...) in both modes.. Could you help me ? Thanx a lot A small sample... <HTML><HEAD><TITLE></TITLE></HEAD>
3
2086
by: JK | last post by:
This is an easy one, but I'm a JS newbie. I want to write a function that determines input value. If 0 - 100 than will use input as % (i.e., 3 would become .03 and used for calculations); otherwise, as dollar value (i.e., 1,000 would become $1,000 and used for calculations). In other words, I want input.value 3 to either be input.value 1 * input.value 2, or simply = input.value 1. Please be specific about placement of function (header or...
28
2604
by: Randy Starkey | last post by:
Hi, Does anyone know where I can get a script that show a little plus sign after a line of text, that when you click the plus sign, more text is revealed on that same page, like a continuing paragraph. This will be on a web page. Thanks! --Randy Starkey
4
14083
by: iwdu15 | last post by:
can anybody help me print from a rich text box? i tried the way they showed on the MSDN web page, but it did not work. I am using VB.net 2003...any help would be appreciated
6
2108
by: JohnnyW | last post by:
Hello, I have I simple question that is not clear for me. So, I have a input field (text field) in my html page. User should give input as a string like following 12 345 678,0 If user gives input in format 12345678,0 and leves the input field how can I format the value 12345678,0 into format 12 345 678,0? Are there any Javascript that can handle this with Regular Expressions?
1
3502
by: namanhvu | last post by:
Hi everyone, I'm trying to create a form where the radio button is automatically selected when the input text field beside it is clicked. I know I need to use "onClick" somewhere but I don't know how. With links I found it it would work like this: <SCRIPT LANGUAGE="JavaScript"> function click(which) {
2
2102
by: Gozil | last post by:
Hello, im having a problem with the text input field im working with. I've made an ajax application that will suggest different links below the input field but if the user already searched something before it will appear a suggest box with previous searches from that user... Look at the picture below and you'll understand what im talking about. http://img338.imageshack.us/img338/4500/preboxvk7.gif I have seen sites that never get that...
6
6428
by: K Viltersten | last post by:
I have the following button: <asp:LinkButton id="Btn" runat="server" text="Click"> </asp:LinkButton> I have added an action listener in the javascript where I change the text on it: this.dom.textContent = "Clicked"; The change is effective but after the site has reloaded the text is back to "Click".
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.