Jump to content

Simple SQL Help


Bradley_James

Recommended Posts

My website is built, and it allows users to input three things, two of which are generic text, and one of which is a link to their website/Facebook page/etc.

 

My question is that I've got it set up where someone may go to my site, search for someone who has inputed data (as said above), and it'll display that data.  However, I want the first two sets of inputted information to display as regular text, and the website URL to be clickable when displayed.

 

In my PHP code, is this solved by having that third text field something other than "varchar" or is it an entirely different line of code?  Thanks!

Link to comment
Share on other sites

Ahh jeez, the fun just doesn't stop!

 

I'm getting the following error when I type out what you gave me.

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/vhosts/practice-space.6te.net/search.php on line 48

 

 

Any ideas?

Link to comment
Share on other sites

im guessing that this occurs when you assign $row['website']  to you href...you either need to wrap it in curly brackets eg

{$row['website'] }

or assign it to a variable e.g

$website = $row['website'] ;

then use $website in your href instead of $row['website']

Link to comment
Share on other sites

Alright it officially works, thanks again!  But I also appreciate your patience with my SQL/PHP incompetence; for I have ONE MORE question.

 

Now that users can post, I guess I never really figured out how to add a "delete" feature to the posts, where they can push "delete" and delete their post if they did it incorrectly.

 

Again, thank you; I'm just a fun bundle of questions.

Link to comment
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.