Forum Moderators: coopster
here's the query:
$result = mysql_query("SELECT * FROM users WHERE userId = '$alumni'");
here's the code:
print "\n<tr>\n\t<td width='25%' bgcolor='#BCD2EE'>Picture:</td><td><img src='{$row['pic_url']}'></td></tr>";
obviously in a table, but there are other filds with the same syntax that are displayed fine.
Not sure what the deal is.
The full code is like this:
displayUserInfo($result);
function displayAlumInfo($result) {
while ($row = mysql_fetch_array ($result))
{
print "\n<tr>\n\t<td width='25%' bgcolor='#BCD2EE'>Picture:</td><td><img src='{$row['pic_url']}'></td></tr>";
etc, etc, etc...
I'm storing the full url, like: [mydomain.com...] <--- not a real link
Here's the code for that:
array_pop($_POST);
if ( get_magic_quotes_gpc() == 1 ) {
// strips slashes if magic quotes is on
// required for use with m_r_e_s()
// returns $_POST with all values stripped of slashes
$_POST= array_map('stripslashes', $_POST);
}
foreach ( $_POST AS $key => $value ) {
/*
assigns a variable name for each POST index
returns the value run through htmlentities & m_r_e_s
*/
$$key = htmlentities(mysql_real_escape_string($value));
}
Otherwise I'm not sure why it would strip the file extension.