Jump to content

Kevin.Arvixe

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.arvixe.com

Profile Information

  • Gender
    Not Telling

Kevin.Arvixe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. close.window is javascript. Output this with the buffer.
  2. Keep exploring the join statement though. Really, this is your answer. I wish i had a server infront of me, but I dont. SELECT theitemid, uitemid, location, image FROM uitems WHERE userid='$uid' AND location='1' LEFT JOIN items ON items.itemid = uitems.uitemid Try that?
  3. $query = "SELECT theitemid, uitemid, location, image FROM uitems LEFT JOIN items ON userid='$uid' AND location='1'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { $itemid = $row['theitemid']; $uitemid = $row['uitemid']; $loc = $row['location']; echo "<a href=?act=view&uitemid=$uitemid><img src=items/$iimage></a><br>$iname"; } Looks like in your first query, you are doing this. I moved the echo to the top query and changed the query aswell... Im not incredibly strong w/ JOIN statements, and I dont have a MySQL box around to toy with, so you may get a syntax error, but essentially you will want to try out multiple JOIN statements to display the items image w/o having to query the database twice.
  4. foreach(); http://us.php.net/manual/en/control-structures.foreach.php Very well said You actually SAID the name of the function that will save you IN the post haha To elaborate... A foreach statement runs through each of the members of an array. Mysql returns results in an array. Happiness achieved.
  5. while($itemrow = @mysql_fetch_array($itemresult)) { $theiid = $itemrow['itemid']; $iname = $itemrow['name']; $iimage = $itemrow['image']; $idesc = $itemrow['description']; $itype = $itemrow['type']; $irarity = $itemrow['rarity']; echo "<a href=?act=view&uitemid=$uitemid><img src=items/$iimage></a><br>$iname"; } }
  6. Zend owns PHP, thats why you would see this. Do your PHP as you normally would, be happy and rejoice.
  7. Ok so do this... Login to your app, then access a page w/ the code you just showed me, that way the $_SESSION variable will be set.
  8. Im just going to throw this out there because you havent gotten any replies... MSSRS is not generally used w/ PHP. I think this is more of a question about MSSRS's SOAP API, which may be better suited for the MS forums.
  9. And this: Also, what is the expected outcome? What is actually being displayed? Also: while($itemrow = @mysql_fetch_array($itemresult)) { $theiid = $itemrow['itemid']; $iname = $itemrow['name']; $iimage = $itemrow['image']; $idesc = $itemrow['description']; $itype = $itemrow['type']; $irarity = $itemrow['rarity']; } echo "<a href=?act=view&uitemid=$uitemid><img src=items/$iimage></a><br>$iname"; } Exam this bit... The while statement goes and sets $iimage to $itemrow['image']; Then resets $iimage to the new $itemrow['image'] Then does it again... then again... until all of the rows are complete. AFTER $iimage is set to the final row, you do an echo. So this is only echo'ing the final row. Put your echo inside of the while statement (if you want each row to be echo'd)
  10. $email_query = mysql_real_escape_string($_SESSION['email_query']; SELECT needs_id, email_id, status, name, email FROM needs WHERE email_query = " . $email_query . " ORDER BY email_id DESC" 1. Whenever you use a WHERE clause, it has to be comparitive. So the variable has to be compared to a row in the database. 2. mysql_real_escape_string(); -- Please be nice to your server admins...
  11. And as far as this goes? $result = mysql_query($query) or die(mysql_error()); Also, what is the expected outcome? What is actually being displayed?
  12. Also, please be kind to your system admins.... mysql_real_escape_string(); $usernamet = mysql_real_escape_string($_POST["desired_username"]); $pass1 = mysql_real_escape_string($_POST["pass1"]); $pass2 = mysql_real_escape_string($_POST["pass2"]); $day = mysql_real_escape_string($_POST["day"]); $month = mysql_real_escape_string($_POST["date"]); $shopname = mysql_real_escape_string($_POST["shopname"]); $email = mysql_real_escape_string($_POST["email"]);
  13. Change this: $test = mysql_query("SELECT * FROM $table WHERE username = '$usernamet'");//this will see if the username exists in the table mysql_error(); To this: $test = mysql_query("SELECT * FROM $table WHERE username = '$usernamet'") or die (mysql_error());
  14. I dont think this will work... Can you echo the value of $_SESSION['HTTP_USER_AGENT'] and $_SERVER['HTTP_USER_AGENT'] for me? Or provide me with the line of code that sets the $_SESSION['HTTP_USER_AGENT']?
  15. arrays work great for this. $variable[0] = value $variable[1] = value2 or also you can do this... while($x=0; $x < 5; $x++) { foreach($_POST as $v) { $variable[$x] = $v; } } That puts all of your $_POST variables into the array $variable.... Granted thats sort of repetitive, but you get the idea right?
×
×
  • 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.