Be a Supporter!
Response to: mysql question Posted June 22nd, 2006 in Programming

Thanks :D

Response to: Review Reponses, PMs, etc. Posted June 22nd, 2006 in NG News

At 6/21/06 05:00 PM, Nino_JoJ wrote:
At 6/21/06 04:57 PM, shazwoogle wrote: all the pm system needs is a noticifaction system.

even if its as simple as

if(messageInIncos>0){
make indoxButton red
}
In English:
if there is any unread PMs make the button red .

Good idea.

Only a good idea if done the google way by checking every so often instead of on every load, else, it'd just be the same as any other form of notifications, the fact that it must key into the database every time, in this case to check for unread PMs.

mysql question Posted June 22nd, 2006 in Programming

How would I make it delete where the ip matches and stat is neutral or declined?

Here's what I tried:

mysql_query("DELETE FROM links WHERE ip_address='{$_GET['ip_address']}' AND stat='Neutral' OR stat='Declined'");

Response to: php logins and stuff Posted June 20th, 2006 in Programming

At 6/20/06 07:27 AM, henke37 wrote: I belive he wants the reffer header.
It's $_SERVER['HTTP_REFER'];

No, I wanted $_SERVER['PHP_SELF']

php logins and stuff Posted June 19th, 2006 in Programming

How do I return the page URL with PHP? I need to know becuase I want a log in script I'm using to use a variable holding the value of the URL of the previous page to (after logging you in) return you to that page... just as NG does when you log in.

Response to: Function I wrote Posted June 18th, 2006 in Programming

Yay, now I can use the function I had the idea of an 'contributed to' :D

Response to: file uploads .. php Posted June 18th, 2006 in Programming

What would dir() do? I looked it up on php.net but didn't really get anything..

Response to: Needed - Help on a few php things. Posted June 18th, 2006 in Programming

At 6/18/06 12:40 AM, herbjr wrote: Hey. I need help on a few things dealing with php.
1. I am creating a script for my user system and on one part of it uploads a file. On the upload form, i added a "name" field so when it is added to the database, it is givin a name:
Id
name (name entered at upload)
url (the url of the uploaded file, uploads/path/to/file)
but it dont add the name entered in the form to the database.

2. How can I make dropdown boxes, check boxes, and/or radio buttons that add/edit the data in a database?
Can someone help me please?

1) Make sure the query is correct with correct column names, make sure the name attribute of the name field is set to name , make sure the column is the correct data type (varchar or text) and make sure you didn't make any mistakes.

2) Just run an UPDATE query. Here's how an UPDATE query is ran:

UPDATE tbl SET col='value' WHERE someCol='something' LIMIT 1

This would go into a table called 'tbl' and it would begin working with the column called 'col'. It would find the row in which the column 'someCol' holds the value of 'something' (you'd probably want to use WHERE id='$id' or something to choose the correct row that was meant to be selected by the user). It now sets 'col' to hold the data 'value'. The LIMIT 1 isn't needed, but it ensures that only 1 row will be updated.

Response to: file uploads .. php Posted June 18th, 2006 in Programming

I have to go, but as an example to what I mean, on imageshack, if you attempt to upload a file that doesn't exist on your computer (easily do this by pressing browse, an image, and change the file name in the file form field to a file you don't have) it will return an error to use the browse button to choose a file.

file uploads .. php Posted June 18th, 2006 in Programming

With php, how do I test if a file being uploaded actually exists on the user's computer at all?

Response to: cgi - i dont understand it =P Posted June 17th, 2006 in Programming

At 6/17/06 12:42 PM, iv00w wrote: i read 100000 books on CGI

Wow, you must read fast.

Response to: I censor Flashes Posted June 17th, 2006 in Game Development

At 6/17/06 04:37 PM, KemCab wrote: So, is that what you specialize in? Blanking out curse words? Wow, what a skill.

:) I <3 the sarcasm of NG

Response to: File creation, copying, renaming... Posted June 16th, 2006 in Programming

If I wanted to use an application to make my own application I'd have done the search myself, thanks for that but I wanted to know how to actually program my own wizard... hence the fact of me posting this in the programming forum.

Response to: posting a flash vid Posted June 16th, 2006 in Programming

IDK why but something makes me think this may belong in general for what you're asking about, though the programming comes in for HTML I guess...

Does gaia allow HTML in profiles? The most basic way with HTML to embed a flash SWF is like so:

<embed src="file.swf" width="550" height="400" />


How would I create something similar to a software installation wizard? Something simple with the whole wizard interface. How would I make something like this (what languages are involved) and how would I make it create files/folders, rename files/folders, copy files/folders, move files/folders, delete files/folders?

Response to: Unleashing PM Grounds !! Posted June 16th, 2006 in Programming

At 6/16/06 05:47 PM, Afro_Ninja wrote:
At 6/16/06 05:46 PM, Nino_JoJ wrote:
ps.
i actually think the idea is good. with it, no more emails would be required.. that will also make as spam-free. in most cases.
why not use the uh... newgrounds pm system?

that's what I was gonna say..

Response to: fwrite linebreaks Posted June 16th, 2006 in Programming

Two choices:

1) Concatenate with double quotes an escaped line break by doing "\n" or just type \n for the line break if the value is already in double quotes.
Example:
$stuff = 'blah'."\n".'blah';

Or if already in quotes:
$stuff = "blah\nblah";
+=+=+=+=+=+=+=+=+=+=+
2) Use the nl2br function. Run the nl2br() function on the text that contains regular line breaks and it'll convert these line breaks to <br /> 's

Examples:

_________________________
|
| nl2br('Hey I am
| bob
| and
| my
| friend is joe');
|________________________

_________________________
|
| $joe = 'blah
| blah
| blah';
| //other shit
| nl2br($joe);
|________________________

Response to: Php Help/profit Opportunity! Read! Posted June 16th, 2006 in Programming

I would help, but that flash example of the "world" is kind of... unprofessional. It needs a lot of work. Also, why do you want to make another neopets? They'll never be topped, they were (if not) the first virtual pet site around and are worth over a million $. I doubt with flash like that you'll do too well, especially with all the lagging.

Response to: my flash site Posted June 15th, 2006 in Programming

HTML to embed an SWF:
<embed src="filePathToSWF" width="WIDTH" height="HEIGHT" />

Response to: dances Posted June 9th, 2006 in General

At 6/9/06 10:27 PM, Q_Block_Clock wrote: Lol 8th grader.

Dances suck to begin with.

STFU Chris :'(

Response to: dances Posted June 9th, 2006 in General

At 6/9/06 10:17 PM, -KennethTheSociopath wrote: 10:15pm on a Friday night and your home already.

Boy, you sure know how to party.

No, it had started really early and ended pretty soon too... because it's an 8th grade dance and they aren't long of course... another reason I'm so bored right now.

Response to: dances Posted June 9th, 2006 in General

hehe, I knew I shouldn't have posted this on my favorite geek site :). It's not common for us geeks to like forms of socialism relative to dances or parties :[

dances Posted June 9th, 2006 in General

You know what really pisses me off? School dances.

Why?

Because they're so much fun that when you get back home you're so bored and there's nothing to do.

Like right now, I just got back from my 8th grade graduation dance..

Response to: under judgement for how long? Posted June 9th, 2006 in Game Development

At 6/9/06 05:24 PM, MarioBilly wrote:
At 6/9/06 05:22 PM, electricfreak wrote:
At 6/9/06 05:18 PM, MarioBilly wrote: And Your A Dick...
Okay. At least I can speak English. You don't capitalize every word in a sentence and it's "you're" not "your."

And I definitely win because
And Your A Dick...

Gug, you're a loser.

Response to: Good lang for special ed? Posted June 9th, 2006 in Programming

At 6/9/06 04:31 PM, VigilanteNighthawk wrote: Thanks for the input. The only problem is I don't think he or his family can afford flash, though it might be good if the open source version ever gets finished.

Student version = $100
All he must do is present his ID, he could get it as a gift.

Response to: Good lang for special ed? Posted June 9th, 2006 in Programming

OMG a teacher on NG :O

Anyway, he should learn HTML first if he doesn't yet know it, then maybe CSS. Then actionscript in flash would be cool, then PHP...

Response to: time() question Posted June 9th, 2006 in Programming

At 6/9/06 01:25 PM, elbekko wrote: 1) $15 is an invalid variable name
2) $t15 = time + (1 * 1 * 15 * 1);
I think

WTF IS THAT?! Why multiply 1 three times? It won't change anything, if you paid attention during arithmetic when you were younger you would know that. That's simply going to add 15 to time and would result in 15 seconds instead of 15 minutes. Sadly, this only would be true if this wasn't a syntax error, what is time? You need to call the time() function, not this time you're using. And if it were a variable it'd need a dollar sign ($).

So as a correct answer, use some simple math, if time() returns the number of seconds since the epoch, the unit being used is seconds. Therefore, adding to this return value with the unit of seconds will result in adding seconds, not minutes, nor hours, nor anything else, to the value. So, keeping this in mind, we will need to convert the number of minutes (15) into seconds to match the value's units and work out correctly. Therefore, we take 60, the number of seconds to a minute, and multiply it by 15 to get the value of seconds equal to the number of minutes we want.

So, 60*15 = 900 meaning that we must add 900 to the return value of time() to add 15 minutes.

In conclusion, you would need to use:
time()+900

Response to: Omfg Do I Win? Posted June 7th, 2006 in General

No, NO!! I had a txt file saved with contents of the 500,000th post! I was gonna make it, AND I FORGOT! DAMMIT!

Response to: NG Shirt Day Posted June 7th, 2006 in General

At 6/7/06 07:59 PM, bifgis wrote: Where can we buy the shirts? And are they at overly inflated prices?

http://www.cafepress.com/newgrounds and no.

Response to: Private Messaging! Posted June 7th, 2006 in NG News

Oh, I have one question, this must be checked off to send a PM:

I understand that if I send out spam, harass or annoy people, or abuse the NG Private Messaging System in any way that I'll be banned with all the scary wrath of Zeus himself.

How could you know if you say you don't moderate PMs?