Uploading through http

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
puREp3s+
Forum Newbie
Posts: 7
Joined: Tue Dec 17, 2002 1:53 am
Location: Scotland

Uploading through http

Post by puREp3s+ »

8O
I am having major problems.

With my site I have a control panel that uses a port number that the proxy at work doesn't let you into. So, I decided to build a web page that used PHP and SQL INSERT queries to upload news etc. to my database.

Within the page I have Name, email, title and info. The info box is where I put all my html code for the article concerned.

The problem seems to be that my textarea for info looks as if it has a maximum character defined somewhere.

I am not sure if this issue is with the textarea, or if there something that defines a max upload in phpinfo() on my host.

When I do get onto the control panel and goto phpmyadmin, the database accepts the information fine.
:?

Can anyone please guide me in the right direction?

Thanks
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

ermm, when using a script to insert data into a table field the only restrictions are that of the fields themselves.

Your problem could be that your info field is set as VARCHAR(255) which is very standard and allows only 255 characters to be entered into it.

If this is whats happening the easiest way to fix it is change the column type:

MySQL command:

ALTER TABLE yourtablename MODIFY info TEXT

This will remove the VARCHAR(255) and replace it will an infinite size column.

Hope this helps.
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

I'm being cheeky here, strictly TEXT cannot have inifnite number of characters. Anyway LONGTEXT can have even more characters.
puREp3s+
Forum Newbie
Posts: 7
Joined: Tue Dec 17, 2002 1:53 am
Location: Scotland

Post by puREp3s+ »

I have already set the field to longtext.

Is longtext the equivelant of memo on and access database?
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

eewwww, using Microsoft!!!!!!

Post by evilcoder »

Access database ey?..... hmmnnn

yeh, i'm pretty sure memo is the same.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

post some of the page code, makes it easier for us to understand.
Post Reply