Jump to content

[SOLVED] A huge problem with PHP script


aproblem

Recommended Posts

Hi guys.

 

First of all I dont have any knowledge of PHP. Thats why I came here to ask if

someone is able to solve my problem.

Im from Finland and Im running my own classifieds site(http://www.ilmoitukset.org). The script Im using is Almond Classifieds Free.

 

 

But the problem is that when you write a description(brief) in ad for example this:

 

AAAA

BBBBB

 

AAAA

 

 

It will appear like this

 

AAAA BBBBB AAAA

 

 

I have located the problem somewhere in between getting the information from MySQL and printing it to the site. I was looking the MySQL database with PHPMyAdmin and there the brief field was like this

 

AAAA

BBBBB

 

AAAA

 

Any php pro willing to help me? The script that Im using is available here http://www.almondsoft.com/loadfree.html

 

Link to comment
Share on other sites

Hi,

I suspect that, as the user states that they have no idea about php, the problem is finding that bit of code to know where to add the code that you suggest.

 

I have downloaded the script that you mention and I think have I have been able to identify the line that is showing the advert description.

 

You need to open the file details.php and go to line 206 (assuming that it hasn't been modified)

You should see this:

 ".$row[$key]."   </td></tr>

Following HektoR's advice, you need to modify this line so that it looks like this:

 ".nl2br($row[$key])."   </td></tr>

I hope this helps, bear in mond that I have never seen or used this code before so I might have got the wrong place :(

 

Chris

Link to comment
Share on other sites

The code didnt work but I'd like to thank you cbolson for having so much trouble for me.

Thank you very much!

 

I found a way to get around the problem.

Apperently the field "brief" was not mentioned to write the long answers. When I started modifying the script I deleted "moredetails" field because I thought its useless since there was the field "brief".

 

Well apparently the field "moredetails" had the property to do this

 

AAA

 

AAA

 

 

But thanks again for helping me!

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.