Search found 317 matches

by $var
Fri Jun 03, 2011 10:46 am
Forum: PHP - Code
Topic: Sessions: Page 1 vs Page 2
Replies: 2
Views: 291

[SOLVED] Sessions: Page 1 vs Page 2

I found out that it was that the session would set and then when i had to refresh the page before I could call the variable.
It was weird, but it's fixed.

Thanks.
by $var
Fri Jun 03, 2011 10:38 am
Forum: Databases
Topic: 3 items in table, mysql_fetch_array shows only 1
Replies: 1
Views: 1177

3 items in table, mysql_fetch_array shows only 1

here is a BASIC php mysql query running in a function: $select = mysql_query("SELECT price, quantity FROM cart_items WHERE (cid = '1')"); $row = mysql_fetch_array($select) or die (mysql_error()); var_dump($row); Here is the table, the first field is the cid: 1 59530N34022 94 2 1 15123N2199...
by $var
Wed Jun 01, 2011 11:05 am
Forum: PHP - Code
Topic: Sessions: Page 1 vs Page 2
Replies: 2
Views: 291

Sessions: Page 1 vs Page 2

Hi webdevs! I am having a hard time with sessions. I bet it's because I don't REALLY understand the intricacies of PHP sessions, but I'm trying to hack my way through. I've got this simple 2 page system, an add to cart page (1) and a cart page (2). Procedure: - On page 1, submit a form and set $_SES...
by $var
Tue Jan 18, 2011 12:48 pm
Forum: PHP - Theory and Design
Topic: Session, Functions and Includes
Replies: 3
Views: 2174

Re: Session, Functions and Includes

I just went about it another way.
I tried by-passing the include altogether but it still failed the captcha.

I think it has to do with Drupal corrupting it somehow.

Thanks anyway!
by $var
Tue Jan 18, 2011 11:23 am
Forum: PHP - Theory and Design
Topic: Session, Functions and Includes
Replies: 3
Views: 2174

Session, Functions and Includes

Hello, I am hitting a wall! I am implementing a captcha in a form that is being called in a template via include. eg: index.php includes form.php Form PHP doesn't have any <head></head> or similar mark-up, it's just a form with PHP processing at the bottom. I am calling the captcha function at the t...
by $var
Mon Jan 10, 2011 2:03 pm
Forum: Javascript
Topic: jQuery for dynamic forms - Review request
Replies: 1
Views: 821

jQuery for dynamic forms - Review request

Hello, I am running into an issue that makes me think there is a better way to do things. Basically, it's a booking system that has many options pending on what was selected in each form section. How I'm doing it: - Form has a dropdown, it has 3 entries the correspond to hidden divs - An option is s...
by $var
Fri Nov 19, 2010 12:41 pm
Forum: PHP - Code
Topic: Submitting Session Values
Replies: 14
Views: 531

Re: Submitting Session Values

You can do it with PHP or AJAX, I think AJAX might be a little easier. But since this is a PHP board: A tutorial on how to use MySQL INSERT with PHP to interact with the MySQL database: http://www.tizag.com/mysqlTutorial/mysqlinsert.php One on using MYSQL SELECT to get the data from the database: ht...
by $var
Fri Nov 19, 2010 12:01 pm
Forum: PHP - Code
Topic: HTML email, good in Gmail but random string in iMail/Outlook
Replies: 1
Views: 249

HTML email, good in Gmail but random string in iMail/Outlook

Hello DevNet, I am using a function that I found to send html formatted emails. I plunked it in and it worked with no issue. Until it was tested by someone using Outlook or iMail, who got a LONG string of indecipherable data. I am using Gmail as my mail client, and I happily/ignorantly getting the n...
by $var
Tue Feb 09, 2010 2:37 pm
Forum: PHP - Code
Topic: Scraping HTML, yuk
Replies: 4
Views: 132

Re: Scraping HTML, yuk

My only guess is that the provider is very far behind in their technology and don't have simple feeds available for syndication of this type.
Problem solved anyhow, no scraping involved.
by $var
Tue Feb 09, 2010 9:18 am
Forum: PHP - Code
Topic: Scraping HTML, yuk
Replies: 4
Views: 132

Re: Scraping HTML, yuk

Hmm... well, I know we're partners and scrape other feeds. But I wouldn't want anyone to get in trouble for assisting me with this one.
Thanks anyway.
by $var
Mon Feb 08, 2010 4:36 pm
Forum: PHP - Code
Topic: Scraping HTML, yuk
Replies: 4
Views: 132

Scraping HTML, yuk

Howdy, I have been tasked with my first HTML scrape and am a bit foggy about how to do it. In short, I need to take 1 of 3 tables out, and part of some content within a table. Here is what I'm working with, I need to keep everything below the white 'Canada...' headline: http://64.246.64.33/merge/tsn...
by $var
Fri Nov 20, 2009 4:04 pm
Forum: PHP - Code
Topic: UTF8 Problems
Replies: 1
Views: 229

UTF8 Problems

Hi! I'm taking a blog feed, parsing it into an array, and spitting it out through my site. The feed itself doesn't have any funky characters, but when I pass it through the site (which IS ISO-5899-1 encoded) I get this: Last night, as the performance was about to begin, the emcee’s instructions we...
by $var
Wed Nov 11, 2009 9:38 am
Forum: PHP - Code
Topic: in_array(); | remove duplicate item from array?
Replies: 1
Views: 374

in_array(); | remove duplicate item from array?

hi! i am working on a photo gallery thumbnail index that has a featured gallery position. in my thumbnail index, I need to omit the featured gallery 'id' if it exists, so that i don't have the featured gallery duplicated in the thumbnail index. i understand that using in_array($id, $array); will hel...
by $var
Tue Aug 25, 2009 9:10 am
Forum: PHP - Code
Topic: solved | function > doesn't return data
Replies: 3
Views: 220

Re: function > doesn't return data

echoing didn't work, but print(); did!

thank you for the tip!
by $var
Tue Aug 25, 2009 9:03 am
Forum: PHP - Code
Topic: solved | function > doesn't return data
Replies: 3
Views: 220

Re: function > doesn't return data

i should be doing this in the template right? <?php     # DFP Omniture Tagging     getDOTPath($_server['REQUEST_URI']."/hockey/nhl/maple_leafs/134513452/this_is_the_story_headline");     echo $string;     ?>   I had that, and it wasn't doing anything. ? From my understanding, in the functi...