Search found 14 matches

by MikeCXT
Wed Sep 05, 2007 2:10 pm
Forum: PHP - Code
Topic: Array Imploding erasing duplicates...?[SOLVED]
Replies: 8
Views: 402

Before I title the thread [Solved], I have a quick question for future clarification. Both CoderGoblin's and stereofrog's ways worked perfect. I actually like CoderGoblins due to repetition being allowed. Stereofrog's has no repetition, but thats just my person preference for my coupon codes... Than...
by MikeCXT
Wed Sep 05, 2007 8:31 am
Forum: PHP - Code
Topic: Array Imploding erasing duplicates...?[SOLVED]
Replies: 8
Views: 402

Array Imploding erasing duplicates...?[SOLVED]

Here is my short code for generating a random coupon number. $convert_array = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","P","...
by MikeCXT
Thu Feb 22, 2007 12:22 pm
Forum: PHP - Code
Topic: Redirect using a Buffer
Replies: 2
Views: 521

Thank you Xinnex, I wrapped my password information in a function, then called the function on my login.php page, and it worked. The page correctly redirects while my includes remain in place. Thank you very much. Since I am changing the password file, the old was: <?php define('MYSQL_USER', 'random...
by MikeCXT
Thu Feb 22, 2007 11:05 am
Forum: PHP - Code
Topic: Redirect using a Buffer
Replies: 2
Views: 521

Redirect using a Buffer

Hello. I have a login page that when correct information is submitted, redirects to a new page. My problem is the issue that no data can be send before the header() statement. I currently have include()s that are at the begining, which contain my password info for mySQL database, which I connect to ...
by MikeCXT
Thu Jan 26, 2006 7:56 am
Forum: PHP - Code
Topic: Php script downloaded what now?
Replies: 1
Views: 207

I'm not an expert, so the rest will have to be answered by someone else, but you should store your password information above the root directory so that no one can view it through the web. Then you just include_once() it into your page so php can use it. See http://forums.devnetwork.net/viewtopic.ph...
by MikeCXT
Thu Jan 26, 2006 7:51 am
Forum: PHP - Code
Topic: Session Not Updating until 2nd Submit
Replies: 2
Views: 249

psst, some code would be helpful. :) alright alright... :) I thought maybe it was a common issue since i swear i've seen it before here, so here's the code... Page "template.php" <form action='payment.php?".strip_tags(SID)."' method='post' name='form' onsubmit='return checkscrip...
by MikeCXT
Wed Jan 25, 2006 3:06 pm
Forum: PHP - Code
Topic: Session Not Updating until 2nd Submit
Replies: 2
Views: 249

Session Not Updating until 2nd Submit

UPDATE: my question is now why is this the case. I have provided all code and explaination below in my response, but I also found the fix, though I do not understand why this is the fix. $_SESSION = $_POST; This was on the 2nd page only. I added it to the first page also and the problem was fixed. D...
by MikeCXT
Thu Jan 19, 2006 3:42 pm
Forum: PHP - Code
Topic: Include() not including Class() [Solved]
Replies: 11
Views: 511

Well, I believe you since all my normal html links are built for portability in that manner, but I tried it and it produced an error as you had it. I don't know why, nor do I know if the include_path has anything to do with it (which I have no control over). I think I'll try to include a php file th...
by MikeCXT
Thu Jan 19, 2006 2:42 pm
Forum: PHP - Code
Topic: Include() not including Class() [Solved]
Replies: 11
Views: 511

Solved

include_once('/aboveroot/user/password.inc.php'); include_once('/aboveroot/user/mysqldb.class.php'); This worked perfect. include_once('/aboveroot/user/domain.com/includes/mysqldb.class.php'); This also worked. I believe I will use this since I can then place the file in my includes directory. I ha...
by MikeCXT
Wed Jan 18, 2006 1:02 pm
Forum: PHP - Code
Topic: Include() not including Class() [Solved]
Replies: 11
Views: 511

Can't include a class with a HTTP wrapper. Then how can I include it if I can not include the full address? I can't touch include_path as this is a shared server? (3rd party runs the server). And everything I have seen about this, tells you to change the include_path. http://www.domain.com/etc/etc....
by MikeCXT
Wed Jan 18, 2006 12:15 pm
Forum: PHP - Code
Topic: Include() not including Class() [Solved]
Replies: 11
Views: 511

Include() not including Class() [Solved]

The Error: Fatal error: Cannot instantiate non-existent class: mysqlclass in E:\aboveroot\user\domain.com\test\postArray\regTest.php on line 5 The Problem: Using security tips from these forums, I hid the password.inc.php file above the root. I can still connect to mySQL, so that part works. The mys...
by MikeCXT
Tue Jan 17, 2006 12:58 pm
Forum: PHP - Code
Topic: Renaming Variables in Foreach [Solved]
Replies: 2
Views: 291

Thanks.
by MikeCXT
Tue Jan 17, 2006 11:16 am
Forum: PHP - Code
Topic: Renaming Variables in Foreach [Solved]
Replies: 2
Views: 291

Renaming Variables in Foreach [Solved]

I have a form that posts the data, which the next page gathers. The variables are never redeclared, so they remain the exact names from the form. I wanted to see if I could change the variable using a foreach statement on the _POST array. Something such as adding a number to the end of each variable...
by MikeCXT
Fri Jan 13, 2006 2:10 pm
Forum: PHP - Code
Topic: POST[] and Array (Sanitizing Question)
Replies: 1
Views: 446

POST[] and Array (Sanitizing Question)

Hello. Currently I have a form that posts all variables to reg.php. Then reg.php will do a $varName = $_POST['varName']; to each Variable... creating a long list of variables being defined from their POST counterpart. Next I take the same long list, but use this: $varName = mysql_real_escape_string(...