skymonkier's Profile User Rating: -----

Reputation: 2 Apprentice
Group:
Active Members
Active Posts:
111 (0.13 per day)
Joined:
14-July 12
Profile Views:
3,272
Last Active:
User is offline Nov 16 2013 09:06 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Safari
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Chevrolet
Dream Kudos:
0
Icon   skymonkier is indubitably a newb.

Posts I've Made

  1. In Topic: Including a Script in echo <<<HTML

    Posted 2 Aug 2013

    View Postno2pencil, on 02 August 2013 - 11:49 AM, said:

    You can't start a php block of code, within a php block of code. It breaks.


    Well, the first way you suggested worked, except that it worked in the totally wrong section of the page. Seems that when you tie it to a variable, it begins where that variable is. XD

    On the other hand, I tried Benign's way and it seems to do... nothing. Actually, it killed my page, so I'm wondering if I even did it right.

    Here's my actual script:
    Omitted due to EDIT.
    
    


    EDIT:
    Scratch that! Found the problem... PHP is so friggin picky about white space after the echo <<<HTML. :P

    Thanks, guys. :neat:
  2. In Topic: Including a Script in echo <<<HTML

    Posted 2 Aug 2013

    View Postno2pencil, on 02 August 2013 - 11:30 AM, said:

    If you are using echo, you are already in a php code segment. So you can't open a new one.

    Well, I just figured since (from what I understand) it prints it out as HTML, it would get translated to the page and as a new section of PHP...

    View Postno2pencil, on 02 August 2013 - 11:30 AM, said:

    Also, what is with the double quotes in your include statement?

    Typo at the time of posting. :P
  3. In Topic: Foreach Loop Not Displaying All Rows

    Posted 1 Aug 2013

    View PostDormilich, on 01 August 2013 - 06:41 AM, said:

    $ps1 = $pdo->prepare(...);
    $ps1->bindValue(...);
    $ps1->execute();
    $result1 = $ps1->fetch();
    
    

    Well, I only asked because I though it'd be something more fancy....
    Though, from the doc I read on PHP.net, what's the advantage of binding versus doing it the way I have been?
  4. In Topic: Foreach Loop Not Displaying All Rows

    Posted 1 Aug 2013

    View PostDormilich, on 01 August 2013 - 06:20 AM, said:

    Id do a complete prepare/bind/execute/fetch cycle before stepping to the next statement

    What would that look like?

    Also, $whatUser's statement is prepared at the top of the script. I figured that preparing all my statements took first priority....
  5. In Topic: Foreach Loop Not Displaying All Rows

    Posted 1 Aug 2013

    View PostDormilich, on 01 August 2013 - 05:57 AM, said:

    it might be that the different open statements interfere with each other, see also closeCursor()

    Well, thanks for that link there; never knew about that.

    But the problem persists... I closeCursor()'d all my statements after they were executed, fixed fetchall() to fetchAll(), and even had my displayTopics (which should be displayReplies, in retrospect) statement SELECT * instead of all the specifics.

    Is there any better way I could write this script?

My Information

Member Title:
D.I.C Head
Age:
15 years old
Birthday:
December 4, 1998
Gender:
Location:
McCune, KS
Interests:
I like gaming, web development, skateboarding, dueling and being random.
Full Name:
Skylear Johnson
Years Programming:
2
Programming Languages:
Web: HTML, CSS and PHP.
Desktop: C++, Lua

Contact Information

E-mail:
Private
AIM:
AIM  skylearj
Skype:
Skype  ilithidsky
Twitter:
skylearj

Friends

Comments

Page 1 of 1
  1. Photo

    no2pencil Icon

    01 Aug 2013 - 08:14
    Hogwarts called. They said you are suspended.
Page 1 of 1