User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 426,101 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,744 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 228
Search took 0.02 seconds.
Posts Made By: nathanpacker
Forum: PHP Apr 4th, 2008
Replies: 5
Views: 1,538
Posted By nathanpacker
Re: Send variable from javascript to php?

Well, in the past, I haven't had to call it other than it's already set in a variable. Usually, when I create a link like "my_link.php?value=3", then in the page, my_link.php, I can simply echo...
Forum: PHP Apr 4th, 2008
Replies: 5
Views: 1,538
Posted By nathanpacker
Re: Send variable from javascript to php?

Great idea. I tried that, and for some reason, it didn't work.
Forum: PHP Apr 4th, 2008
Replies: 5
Views: 1,538
Posted By nathanpacker
Send variable from javascript to php?

Wasn't sure whether to put this in java or php, so I'm putting it here. I have a bit of java that opens a php page in a popup window, using this code:

<a href="javascript:
void(0)...
Forum: PHP Mar 6th, 2008
Replies: 6
Views: 870
Posted By nathanpacker
Re: My PHP math is calculating weird!

Ah, gotcha. Well then, how do calculators do it so well dang it? (you don't have to answer that. Semi-rhetorical question.)
Forum: PHP Mar 6th, 2008
Replies: 6
Views: 870
Posted By nathanpacker
Re: My PHP math is calculating weird!

That's an interesting answer. I guess I'm just confused. If you divide something by 100, you end up with two decimal places, period. Shouldn't be that dificult, rught? Well, I think I'm happy...
Forum: PHP Mar 2nd, 2008
Replies: 6
Views: 870
Posted By nathanpacker
My PHP math is calculating weird!

Hey, I've got some values that don't seem to be calculating correctly. I've got two numbers, subtracting one from another, and instead of the answer being an exact number, like .06, it's coming out...
Forum: PHP Feb 3rd, 2008
Replies: 4
Views: 1,377
Posted By nathanpacker
Re: Get sum of values in a loop?

Yeah, sorry, I need to be more clear. I need to get the sum of the 'total$id' fields. I can get the sum of the allotment column from my database, but I need the sum of some of the totals that are...
Forum: PHP Feb 3rd, 2008
Replies: 4
Views: 1,377
Posted By nathanpacker
Get sum of values in a loop?

This is partly PHP, partly javascript, so I wasn't sure where to stick it, but I'll stick it here. I'm sorry if this is a bit confusing, but I hope I can explain myself well.

The below code queries...
Forum: PHP Dec 4th, 2007
Replies: 7
Views: 1,131
Posted By nathanpacker
Re: Delete temporary file on users machine?

Well, I tried putting this in the <head> tags of the page:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">

As well as this:

<META http-equiv="Pragma" content="no-cache">

And it's still...
Forum: PHP Dec 4th, 2007
Replies: 7
Views: 1,131
Posted By nathanpacker
Re: Delete temporary file on users machine?

Ah, I see, instead of sending the headers via php, put them where they ought to be in the first place? Thanks for not laughing in my face. That should do it, I'll give that a try.
Forum: PHP Dec 3rd, 2007
Replies: 7
Views: 1,131
Posted By nathanpacker
Re: Delete temporary file on users machine?

So you're saying that code needs to go on the page that I'm displaying the image on? Little problem with that, can't use php. Only html. I can run the php script from anywhere, the page that's...
Forum: PHP Dec 3rd, 2007
Replies: 7
Views: 1,131
Posted By nathanpacker
Delete temporary file on users machine?

Quick question here. I wanted a way to quickly change the URL of an image that is place on my page, so I came up with the following little script:


<?php

echo "Status: $status";
if ($status ==...
Forum: PHP Nov 6th, 2007
Replies: 8
Views: 2,138
Posted By nathanpacker
Re: Adding x amount of days to a specific date?

Thanks guys, that got it working right.
Forum: PHP Nov 4th, 2007
Replies: 2
Views: 2,030
Posted By nathanpacker
Re: Update multiple rows from loop?

Sorry, try this one. (http://www.daniweb.com/forums/thread35096.html)

And like I said, the one in that post is way more than I'm trying to do, but it addresses the same problem I'm having. In...
Forum: PHP Nov 4th, 2007
Replies: 2
Views: 2,030
Posted By nathanpacker
Update multiple rows from loop?

Alright, this one has me stuck. I know it's possible, because I've seen an example in another thread, but mine is slightly different, and I can't figure it out.

Ok, I have one script that pulls all...
Forum: PHP Nov 3rd, 2007
Replies: 3
Views: 466
Posted By nathanpacker
Dynamically updating values in a form as you type?

Hey, not sure if this is possible with PHP, but I thought I'd ask anyway. Is it possible to update values on an html page based on values being typed into an input box? For example. My table has...
Forum: PHP Nov 1st, 2007
Replies: 8
Views: 2,138
Posted By nathanpacker
Re: Adding x amount of days to a specific date?

Not exactly meaningless, that's the format you have to put in the mysql table to tell it what format you want. Ok, my date format is yyyy-mm-dd.
Forum: PHP Nov 1st, 2007
Replies: 8
Views: 2,138
Posted By nathanpacker
Adding x amount of days to a specific date?

I have looked everywhere, I've figured out how to add x amount of days to the current date, or take away x amount of days from the current date. But let's say I have a date stored in my database as...
Forum: PHP Nov 1st, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
Re: MYSQL: update all fields in a table (increase value by one)

Thanks, but I've never used stored procedures, and I don't quite understand them or how to implement them yet. Besides, I don't think a SP would work, as a SP is static, and I will changing the rows...
Forum: PHP Nov 1st, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
Re: MYSQL: update all fields in a table (increase value by one)

Well, if I knew how to create and use them, and if it were possible through phpMyAdmin, seeing as that is the only access I have to my databases, I might try that. However, I'm not too worried about...
Forum: PHP Nov 1st, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
Re: MYSQL: update all fields in a table (increase value by one)

You'd think, but I tried that and it didn't work either. It seems that any UPDATE I do in a loop, just makes the changes to every row, even if I specify only one row. There's got to be a simple...
Forum: PHP Oct 31st, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
Re: MYSQL: update all fields in a table (increase value by one)

Well I've been trying that, and playing around with the commands, but can't seem to get it to work quite right. Funny thing is, in my php code, I echoed out the variables immediately before the...
Forum: PHP Oct 31st, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
Re: MYSQL: update all fields in a table (increase value by one)

Thanks. Sorry it's taken me a while to reply. I haven't had time to get back to this part until now. Your code make sense, and it looks to me like it should work, but it's not. What it ends up...
Forum: PHP Oct 29th, 2007
Replies: 2
Views: 1,136
Posted By nathanpacker
Forum: PHP Oct 29th, 2007
Replies: 2
Views: 1,136
Posted By nathanpacker
Displaying Mysql rows, alternate colors?

Hey, I'm using a while loop to display all the rows of a table in my database, and wondered if anyone knows how I can make it so the background color of each row alternates between two different...
Forum: PHP Oct 29th, 2007
Replies: 16
Views: 7,326
Posted By nathanpacker
MYSQL: update all fields in a table (increase value by one)

Hey, I've got a simple little table that has only 3 fields. ID (primary key, auto-increment), cat_name, and cat_num.

I need to know how to get my php script to go into that table, and increase the...
Forum: PHP Oct 5th, 2007
Replies: 3
Views: 2,172
Posted By nathanpacker
Re: How to graph mysql data?

Thanks, I saw JpGraph, and it looked a little overkill for what I need, but if you recommend it, maybe I'll give it a shot.
Forum: PHP Oct 4th, 2007
Replies: 4
Views: 636
Posted By nathanpacker
Re: Entering time in form MM:SS

Thanks for the reply. That works for the output, however, I tested inputting like you said, and if you simply input 45:05, it will go in the database as 45:05:00, or 45 hours, and 5 minutes. That's...
Forum: PHP Oct 4th, 2007
Replies: 3
Views: 2,172
Posted By nathanpacker
How to graph mysql data?

Hey, I've been searching around, having a hard time finding something. Are there any simple scripts out there or something that I can use to generate graphs from information in mysql database tables?
Forum: PHP Oct 4th, 2007
Replies: 4
Views: 636
Posted By nathanpacker
Entering time in form MM:SS

Hey, this is kind of a dumb problem, but I'm stumped by it. I wrote a little script to track my morning bike rides, and I have a time field to put in the time that I rode. Mind you, this is not the...
Forum: Web Developers' Lounge Sep 21st, 2007
Replies: 15
Views: 2,225
Posted By nathanpacker
Re: Do I need a new webhost?

Cool thanks! I'll look into it.
Forum: Web Developers' Lounge Sep 18th, 2007
Replies: 15
Views: 2,225
Posted By nathanpacker
Re: Do I need a new webhost?

That is very helpful actually, because I've been thinking about bluehost. A friend of mine has hosting with them, but was unable to get a wordpress site working. So he let me play around on it, and...
Forum: PHP Sep 10th, 2007
Replies: 7
Views: 1,173
Posted By nathanpacker
Re: Pull info from gas price websites?

Thanks for that reply. I will be simply pulling one number every time the script is run. A specific gas price. I'll look into your ideas as well.
Forum: PHP Sep 10th, 2007
Replies: 7
Views: 1,173
Posted By nathanpacker
Re: Pull info from gas price websites?

Hm, good info. I'll take a look into it and let you know how it goes. This just might work. Thanks!
Forum: PHP Sep 10th, 2007
Replies: 7
Views: 1,173
Posted By nathanpacker
Pull info from gas price websites?

Anybody know if there's a way to pull gas prices from any of those gas price websites, so I can display them on my own page? I didn't know if there's a way to tap in to their source or if they...
Forum: Shell Scripting Aug 16th, 2007
Replies: 2
Views: 691
Posted By nathanpacker
Forum: Web Developers' Lounge Aug 14th, 2007
Replies: 15
Views: 2,225
Posted By nathanpacker
Re: Do I need a new webhost?

Thanks, I'll give them a try.
Forum: Shell Scripting Aug 14th, 2007
Replies: 2
Views: 691
Posted By nathanpacker
Giving a user access to additional groups

Hey, I need to know the command for adding secondary groups for a user. The only catch is that I have to assume that they are already members of some secondary groups. And if I use modprpw -G...
Forum: Shell Scripting Aug 7th, 2007
Replies: 2
Views: 2,135
Posted By nathanpacker
Re: Comparing two files...

found something that works:

awk -F: 'FNR==NR {
users[$2]
next
}
!( $1 in users ) { print $0 }' myusers /etc/passwd
Forum: Shell Scripting Aug 7th, 2007
Replies: 2
Views: 2,135
Posted By nathanpacker
Re: Comparing two files...

How about something like this:

Do the awk to get all the usernames out:
root# awk -F: '{ print $1 }' /etc/passwd > users.txt
Then do a for loop with a grep -v against all the usernames in...
Showing results 1 to 40 of 228

 
All times are GMT -4. The time now is 3:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC