Jump to content

viperfunk

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

viperfunk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Good day! I have a web application that uses PHP sessions and I wanted to get a better idea on how they work. I have a php site set up. It's pretty straight forward...usual php pages with some server side scripts. Currently, my pages call session_start() at the beginning of my php files. I suppose my first question is, let's say a user visits the site and session_start is called. Now let's say down the road the application assigns a value to the session array like $_SESSION['foo'] = 'bar' If another user visits the page and teh script check is $_SESSION['foo'] is set....what will happen? Didn't another user already set that value? how does this work? Thanks for your help - just trying to understand this a bit better.
  2. Tried both of those solutions, still no error and no updating occurs. any other suggestions?
  3. My update statement isn't returning an error, but is also not updating. Is there some flaw in my php? Here is the code: <?php if ($edit_record == 1) { $db->execute("UPDATE NEWS SET (p_title = ?, p_date = ?, p_body = ?, p_author = ?) WHERE p_id = ?", Array($title, $date, $body, $author, $id)); echo "<meta http-equiv='refresh' content='0' URL='http://MYURL/admin.php'>"; } echo "<input type='hidden' name='edit_record' value='1'>"; echo "$row[0]"; echo "<input type='hidden' name='id' value=\"$row[0]\">"; echo "<input type='text' name='title' value=\"$row[1]\"><br>"; echo "<input type='text' name='date' value=\"$row[2]\"><br>"; echo "<textarea name='body' cols=50 rows=8>$row[3]</textarea><br>"; echo "<input type='text' name='author' value=\"$row[4]\"><br>"; echo "<input type='submit' value='edit'>"; echo "</form></td></tr>"; echo "<tr><td><hr size=2 width=800></td></tr>"; } echo "</table>"; ?> Cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.