Search found 32 matches

by jrucifer
Mon May 24, 2010 1:25 pm
Forum: PHP - Code
Topic: Editing XML via PHP safely.
Replies: 1
Views: 174

Editing XML via PHP safely.

Hello all, I recently decided to design and develop a photo gallery that can be easily managed by the user without relying on a database. I decided to use XML as my data storage and source, but quickly realized a potential flaw. The write permissions must be set to global in order to write over the ...
by jrucifer
Mon Nov 19, 2007 2:55 pm
Forum: PHP - Code
Topic: Inconsistant Order of Execution...?
Replies: 6
Views: 682

adding "exit;" after the header redirect solved it... I thought php scripts "exit" automatically at the end of the script? edit: duh.. it's cause I'm running the processing script on the same page as the form, using if($_SERVER["REQUEST_METHOD"] == "POST")... ...
by jrucifer
Mon Nov 19, 2007 2:35 pm
Forum: PHP - Code
Topic: Inconsistant Order of Execution...?
Replies: 6
Views: 682

before submitting the form, a PHP notice telling me theres no index for "msg", same thing after submitting the form... Why is it unsetting the session variable before executing any other code?? again, if I remove the 'unset' line, var_dump prints out the session variable info after the for...
by jrucifer
Mon Nov 19, 2007 2:10 pm
Forum: PHP - Code
Topic: Inconsistant Order of Execution...?
Replies: 6
Views: 682

Inconsistant Order of Execution...?

This isn't making sense to me at all... I'm trying to use session variables to display an error message, and then unset the variable.. The method works fine on 2 different login pages, but I'm trying to use the same procedure on a different form and it's unsetting the variable before the echo... Her...
by jrucifer
Mon Feb 05, 2007 2:06 am
Forum: PHP - Code
Topic: handling subdomain redirects?
Replies: 3
Views: 1101

Okay, I decided to stop being lazy and try to figure it out on my own a little more... what I came up with is pretty... shotty, but it works. $host = $HTTP_HOST; $names = explode(".", $host); foreach($names as $name) { if($name == "www" or $name == "domain" or $name == ...
by jrucifer
Mon Feb 05, 2007 1:40 am
Forum: PHP - Code
Topic: handling subdomain redirects?
Replies: 3
Views: 1101

handling subdomain redirects?

I have a wildcard subdomain pointing to my site. My question is, can I run a PHP script to pull the subdomian from the URL? So if the URL is http://username.domain.com, pull "username" and set it equal to a variable? Is this possible, or do I have to go crazy setting up mod_rewrite redirec...
by jrucifer
Sun Dec 31, 2006 9:52 pm
Forum: PHP - Code
Topic: video thumbnail?
Replies: 3
Views: 1424

exactly the type of thing i'm looking for, thank you!
by jrucifer
Sun Dec 31, 2006 5:51 pm
Forum: PHP - Code
Topic: video thumbnail?
Replies: 3
Views: 1424

video thumbnail?

Is there any way to use PHP to create a screen grab from a quicktime movie? Any kind of addon or anything? If someone could point me in the right direction, I'd be very thankful.
by jrucifer
Thu Oct 26, 2006 10:11 pm
Forum: PHP - Code
Topic: Return the URL a form was submitted from?
Replies: 2
Views: 652

Return the URL a form was submitted from?

Is there any way in PHP, or any other scripting for that matter, to return the URL from which a form is being submitted from? Any kind of a preset $_POST variable perhaps? Mainly, I just want to see if anyone attempts to submit data from an unwanted URL. I have front-end and back-end verification, s...
by jrucifer
Mon May 08, 2006 9:42 pm
Forum: PHP - Code
Topic: word wrap without breaking HTML code
Replies: 2
Views: 604

word wrap without breaking HTML code

I have a website that is updated by a group of users, and if they ever copy and paste a URL, it breaks the tables. I've tried using word wrap, but then it breaks any long html code. Logically, it seems like the best solution would be to exclude anything in the < > brackets from being wrapped, but I'...
by jrucifer
Sun Mar 05, 2006 5:18 pm
Forum: PHP - Code
Topic: image question
Replies: 1
Views: 444

image question

okay, so i'm making thumbnails for a portfolio website, and everything is working perfectly but i have just one question. I am making the thumbnails just a resized portion of the image. The only problem is since the demensions of the image are measured from the top left corner, the thumbnail is alwa...
by jrucifer
Fri Feb 10, 2006 3:41 pm
Forum: PHP - Code
Topic: mysql_fetch_array question
Replies: 5
Views: 2047

great, even more simple than i was hoping for. Thanks a lot.
by jrucifer
Fri Feb 10, 2006 3:30 pm
Forum: PHP - Code
Topic: mysql_fetch_array question
Replies: 5
Views: 2047

mysql_fetch_array question

this is a rather simple question, so i hope there is a simple answer...

is there any way to have mysql_fetch_array output only 1 of many similar entries in the database?

for example, if these were entries in my database:

a
b
a
b
b
c
c
c

the output would be:

a
b
c

Thanks for any help.
by jrucifer
Tue Jan 31, 2006 1:20 am
Forum: PHP - Code
Topic: cookies not working in safari?
Replies: 6
Views: 1448

still not working... this is very strange...

all other cookies work for me in safari
using the most basic setcookie string, the cookie works in other browsers but not safari...

what could be causing this problem?
by jrucifer
Sun Jan 29, 2006 12:39 pm
Forum: PHP - Code
Topic: cookies not working in safari?
Replies: 6
Views: 1448

yes I have... it's set to always accpet cookies.