Jump to content

neller

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

neller's Achievements

Member

Member (2/5)

0

Reputation

  1. I think you have just forgot to add the variable part by looks of it Your current code doesnt add to a variable to echo out as u can see below.. '<a><button id="addtoDL" class="positive" style="margin:0 5px;">DOWNLOAD</button></a>'; You either need to add it to the variable you are using $insertgallery .= '<a><button id="addtoDL" class="positive" style="margin:0 5px;">DOWNLOAD</button></a>'; or echo it out echo '<a><button id="addtoDL" class="positive" style="margin:0 5px;">DOWNLOAD</button></a>';
  2. $count = count($links); // how many items are in the array // echo $count; exit; //this echo's 16...so there's stuff in the array $i = 0; // total count $s = 0; // table cell count...should ever get above the value of 3 while ($i <= $count) { if ($s == 0) { echo "<tr>"; } // if at the start of a table row, start the row echo $links[$i]; $i++; $s++; // print out the table cell with the proper value if ($s < 3) { echo "<td> </td>"; $s++; } // if we're not at table column 3, add a new column...this also should close the row with "null" values to fill in the table if ($s == 3) { echo "</tr>"; $s = 0; } // are we at table column 3? If so, close the row. } try removing the ; from the end of your while statement, I have done so above, I think that will fix it
  3. Making the following 2 changes will fix it.. 1 - change the text on your submit button, currently you have spaces " Register " , but in your PHP you are not checking for spaces you just have if (isset($_POST['submit']) && $_POST['submit'] == 'Register') So change your submit button to... <input type="submit" value="Register" name="submit" id="submit"/> then I always find wrapping my if statements in brackets is far better as it none of it will get run unless it passes your checks u are doing, so for example use this.. if (isset($_POST['submit']) && $_POST['submit'] == 'Register') { $query = 'INSERT INTO nelyn_user (user_id, username, password, email) VALUES (NULL, "' . mysql_real_escape_string($email, $db) . '", ' . '"' . mysql_real_escape_string($username, $db) . '", ' . 'PASSWORD("' . mysql_real_escape_string($password, $db) . '"))'; $result = mysql_query($query, $db) or die(mysql_error()); $user_id = mysql_insert_id($db); $_SESSION['logged'] = 1; $_SESSION['email'] = $email; header('Refresh: 5; URL=login.php'); } Hope that helps and all make ssense
  4. have you added single quotes either side of the username? it looks like you are escaping the query using the double quotes to use the $session->username variable but you need single quotes if so either side of those ' ".$session->username " ' (without the spaces)
  5. thansk for the reply guys. The server doesn't get tied up just that user, the page istelf uses loads of various tables the page loads pretty well due to the amount of data it displays, BUT the user has to wait for that page to load before any of the others will bother loading. The second that page finishes loading then the other pages load instantly again. If the same user was on the website using 2 different browsers / database connections, then they can easily load that big page in 1 and move around the site in the other, but this is not ideal as I need them to be able to do it in the 1 session. I tried doing a new / seperate database connect for that page, but that didnt work either
  6. Hi guys, Wasnt 100% sure how to title it but this is what I'm trying to do... I have a site where 99% of the pages load pretty fast but there is 1 page which takes about 3 mins to load (very big database useage) When the user opens this page they can't load any of the other pages until this one has finished loading, is it possible to say open a second connection when using this page so they can carry on using the rest of the site while this is loading? Thanks
  7. Can anybody recommend a good book on java servlets? I have very small knoweldge on Java so need it to be a beginners book
×
×
  • 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.