Search found 45 matches

by bonkers
Thu Nov 27, 2003 2:38 am
Forum: PHP coding => Images
Topic: Loading images to MySQL
Replies: 2
Views: 3832

That's what I've done to on my website, http://www.carsfx.com. The images are stored in a folder and named by the unique name of the car and the username. I just combine the both to retrieve the picture. It also allows me to manipulate the images with imagemagic via exec();
by bonkers
Fri Nov 21, 2003 4:07 pm
Forum: PHP coding => General
Topic: Randomization
Replies: 9
Views: 2826

hrmm...I guess I really didn't mean random but rather scrambled. It's chill, it works now. :)
by bonkers
Wed Nov 19, 2003 6:05 pm
Forum: PHP coding => General
Topic: Randomization
Replies: 9
Views: 2826

I found that when specifying a limit greater than 1, it may pick the same record(s) again. It's like picking names from a hat. It picks a name and puts it back, picks another name, puts it back again. I was under the impression that it would pick a name, take leave it out, and take another name, whe...
by bonkers
Tue Nov 18, 2003 6:25 pm
Forum: PHP coding => General
Topic: Randomization
Replies: 9
Views: 2826

If I say:

SELECT column FROM table ORDER BY RAND() LIMIT 4;

and I only have 4 entries, is there any possibility that the same entry could be called twice, and another entry not be called at all?
by bonkers
Mon Nov 17, 2003 8:42 pm
Forum: PHP coding => General
Topic: Randomization
Replies: 9
Views: 2826

I'm kinda confused. See... I put the objects in order by giving each word a number id. I'll try what you said and maybe that'll work, but I'm still kinda confused. BTW, if I say that the limit is the number of items in the table, will it select every single item once, or some itmes some times and so...
by bonkers
Sun Nov 16, 2003 9:47 pm
Forum: PHP coding => General
Topic: Randomization
Replies: 9
Views: 2826

Randomization

I've got a database full of word definitions. I would like to move the table in the mysql database, or the data inside it, to another table, except I would not like to put it in the same order as it's in currently. I want to be able to access it randomly.
by bonkers
Thu Jul 17, 2003 8:32 am
Forum: PHP General
Topic: A Monday Exercise - "Graphical Pseudofont"
Replies: 10
Views: 1932

I know this is kinda off topic but it came to me from this topic. I see a lot of people putting their php files so that people can view then as .phps, and there seems to be a standard color coding to it. How do you get it to come out like this? When I put my docs as .phps it's all black text... How ...
by bonkers
Thu Jun 26, 2003 7:02 am
Forum: PHP coding => Mail
Topic: Using a button to send mail?
Replies: 1
Views: 1779

Simlply mail with a form and link to the form:

<a href="mail.php&option1=whatever&option2=whateveragain">Mail</a>

mail.php

Code: Select all

<?
mail($_GET[option1],$_GET[option2]);
?>
by bonkers
Tue Jun 24, 2003 1:17 pm
Forum: PHP coding => General
Topic: Permission Denied
Replies: 4
Views: 1563

When you copied your files, did you use tar and gzip compression? They're really good and keep all the permissions.
by bonkers
Tue Jun 24, 2003 1:16 pm
Forum: PHP coding => Images
Topic: resizing with imagemagik
Replies: 3
Views: 2140

So umm... what should I use?
by bonkers
Tue Jun 24, 2003 12:18 am
Forum: PHP coding => Images
Topic: resizing with imagemagik
Replies: 3
Views: 2140

resizing with imagemagik

I've been looking around for a while but have had a hard time finding a tutorial on using imagemagik with php to resize images. All I want to be able to do is take an uploaded image and resize it twice. Once for the thumbnail and once for the full size. Only resize for the full size if original imag...
by bonkers
Mon Jun 23, 2003 9:13 pm
Forum: PHP coding => General
Topic: Permission Denied
Replies: 4
Views: 1563

Permission Denied

I'm getting this error but I don't know what permissions to change. Basically I'm trying to copy an uploaded file from the /tmp to a home directory /home/carshow/webspace/images/cars but it say permission denied...it's screwed up.
by bonkers
Sun Jun 15, 2003 5:43 pm
Forum: mySQL & php coding
Topic: Syntax problem...wtf?
Replies: 2
Views: 1146

Syntax problem...wtf?

I can't quite figure out what the syntax problem here is: UPDATE user SET info='Yo Dawg...sup?', SET email='hi@ho.com' WHERE username='bonkers'<br> <br> You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET email='h...
by bonkers
Sun Jun 15, 2003 7:12 am
Forum: PHP coding => General
Topic: if statement thingy
Replies: 6
Views: 1898

like this:

Code: Select all


if($variable == $variable->functionThatReturnsArray())
{
     [i]stuff[/i]   
}
by bonkers
Sat Jun 14, 2003 10:12 pm
Forum: PHP coding => General
Topic: passing PHP varibales to Javascript...
Replies: 4
Views: 1609

Forgive me if I'm wrong cuz I'm a n00b at PHP but I thought that since the file is parsed for <??> tags that any other tags don't matter when it's in your HTML. So <?=$variable?> should work. Try <? echo $variable; ?>...might work ya neva know.
by bonkers
Sat Jun 14, 2003 10:41 am
Forum: PHP coding => General
Topic: if statement thingy
Replies: 6
Views: 1898

Wait but that means I can't call the function in the if statement that returns the array?
by bonkers
Fri Jun 13, 2003 11:43 pm
Forum: PHP coding => General
Topic: if statement thingy
Replies: 6
Views: 1898

if statement thingy

in C++ I can do this:

if($joe == getArray()[4])

it will compare $joe and the 5th ([4]) element of the returned array from the varialb getArray(). How can I do this in PHP?
by bonkers
Sun Jun 08, 2003 8:17 am
Forum: PHP coding => General
Topic: Session Error...?
Replies: 3
Views: 1252

OH... oops...yea it's at the bottom... It's the same deal with header() huh?
by bonkers
Sat Jun 07, 2003 9:00 pm
Forum: PHP coding => General
Topic: Session Error...?
Replies: 3
Views: 1252

Session Error...?

I'm having problem with sessions, does anyone know of a very descriptive tutorial? I get these errors trying to start sessions, yet there are no "header()" functions being called. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (out...
by bonkers
Fri Jun 06, 2003 10:26 pm
Forum: PHP coding => General
Topic: news, bulletin php .. ?
Replies: 1
Views: 1030

Wait...automatically? I don't know how automatically, but if you made a script like the following that'd automatically copy the page:

Code: Select all

<?
include("http://yoururl.com/post/");
?>


Actually, I'm only "pretty" sure that would work.
by bonkers
Fri Jun 06, 2003 4:25 pm
Forum: PHP General
Topic: php in separate file
Replies: 3
Views: 1669

If what you're asking is if you could like...I dunno, Make a complete page in HTML, and just add little parts where you want PHP code? I mean sure! All you have to do is in your PHP code in your new file is include '../relative/path/of/whatever.html'; and it'll be included. Personally I like to have...
by bonkers
Fri Jun 06, 2003 1:00 pm
Forum: mySQL & php coding
Topic: MySQL Abilities
Replies: 8
Views: 2180

What is the PK of a row?
by bonkers
Fri Jun 06, 2003 5:12 am
Forum: PHP coding => General
Topic: Variable Blankness
Replies: 3
Views: 1179

no I figured it out, I'm stupid. Never try to program when you're half awake. I read this page but I didn't catch it. Check it out: http://us3.php.net/variable.scope I think I missed it the first time around.
by bonkers
Thu Jun 05, 2003 9:35 pm
Forum: PHP coding => General
Topic: Best editor for PHP
Replies: 210
Views: 177843

VIM by far is the best editor IMHO... But that's because I don't like to try new editors when I already got my best friend...I mean, my text editor. I have it on my server, and I edit my pages directly via ssh. FUN!