Posted on Friday 1st June 2007 at 09:50 PM
Diablosblizz
Diablosblizz
You've edited a LOT! Its really hard to see what is what.

Try looking over the mysql_querys. They seem fine to me, but its hard.
Posted on Friday 1st June 2007 at 09:43 PM
MCP
MCP
Ignore the black text. That is my html for the layout. lol
Posted on Friday 1st June 2007 at 09:42 PM
MCP
MCP
The problem I am having with this is it is not updating the DB

The problem is likely happening in editprofile.php
I had a look and could not find anything.

PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Raine Photographery</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Your website description goes here" />
<meta name="keywords" content="your,keywords,goes,here" />
<link rel="stylesheet" href="http://www.messcasts.com/rainephoto/style.css" type="text/css" media="screen,projection" />
</head>

<body>
<div id="container" >

<div id="header">
<h1>Raine Photography</h1>
<h2>Photos from the world beyond!</h2>
</div>

<div id="navigation">
<ul>
<li><a href="../news.php"><strong>News</strong></a></li>
<li><a href="../photographers.php"><strong>Photographers</strong></a></li>
<li class="selected"><a href="login.php"><strong>Members Area</strong></a></li>
<li><a href="../index.php"><strong>Galleries</strong></a></li>
<li><a href="../models.php"><strong>Models</strong></a></li>
<li><a href="../contact.php"><strong>Contact Us</strong></a></li>
<li><a href="../admin.php"><strong>Admin Tools</strong></a></li>
</ul>
</div>

<div id="content">
<h2>Member Area</h2>
<p><div style="width: 750px;">
  <?php
session_start
(); //allows session
include "config.php";
echo 
"<left>";
//checks see if there logged in
if($logged[id]) 

if(isset(
$_GET['update'])){
$email addslashes(htmlspecialchars($_POST[email])); 
$ehidden htmlspecialchars($_POST[ehidden]); 
$location addslashes(htmlspecialchars($_POST[location])); 
$age = (int)addslashes(htmlspecialchars($_POST[age])); 
$sex addslashes(htmlspecialchars($_POST[sex])); 
$about addslashes(htmlspecialchars($_POST[about])); 
$interests addslashes(htmlspecialchars($_POST[interests])); 
$msn addslashes(htmlspecialchars($_POST[msn])); 
$skype addslashes(htmlspecialchars($_POST[skype])); 
$aim addslashes(htmlspecialchars($_POST[aim])); 
$deviantart addslashes(htmlspecialchars($_POST[deviantart])); 
$yahoo addslashes(htmlspecialchars($_POST[yahoo])); 
//checks the sex if its ok
if(($sex == "Male") || ($sex == "Female")){
//updates there profile in the db
$update mysql_query("UPDATE `members` SET `email` = '$email', `sex` = '$sex', `age` = '$age', location = '$location', ehidden = '$ehidden', `about` = '$about', `interests` = '$interests', `msn` = '$msn', `skype` = '$skype', `aim` = '$aim', `yahoo` = '$yahoo', `deviantart` = '$deviantart' WHERE `username` = '$logged[username]'");
echo 
"Profile updated!<br>
<a href="login.php">Return to Member Area</a> or <a href="editprofile.php">Continue Editing</a>"
;
}
//if the sex is invalid
else
{
echo 
"Invalid sex input!";
}
}
else
{
$getuser mysql_query("SELECT * FROM `members` WHERE `username` = '$logged[username]'");
$user mysql_fetch_array($getuser); 
echo 
"<form action='editprofile.php?update' method='post'> 
<table width='350'>
  <tr>
    <td width='150'>Email:</td>
    <td width='200'><input type='text' name='email' size='30' maxlength='55' value='
$user[email]'></td>
  </tr>
  <tr>
    <td>Show Email?</td>
    <td><select name='ehidden'>
<option selected='selected' value='yes'>Yes</option>
<option value='no'>No</option>
</select></td>
  </tr>
  <tr>
    <td>Location:</td>
    <td><input type='text' name='location' size='30' maxlength='40' value='
$user[location]'></td>
  </tr>
  <tr>
    <td>Age:</td>
    <td><input type='text' name='age' size='3' maxlength='3' value='
$user[age]'></td>
  </tr>
  <tr>
    <td>Sex:</td>
    <td><select size='1' name='sex' value='
$user[sex]'>
        <option value='Male' "
; if($user[sex] == Male) { 
echo 
"selected"; } 
echo 
">
      
      
      Male
      
      
      </option>
        <option value='Female' "
; if($user[sex] == Female) { 
echo 
"selected"; } 
echo 
">
      
      
      Female
      
      
      </option>
    </select></td>
  </tr>
  <tr>
    <td>About:</td>
    <td><textarea name='about' cols='23.5' rows='7' maxlength='700' >
$user[about]</textarea></td>
  </tr>
  <tr>
    <td>Interests:</td>
    <td><input type='text' name='interests' size='30' maxlength='40' value='
$user[interests]' /></td>
  </tr>
  <tr>
    <td>MSN:</td>
    <td><input type='text' name='msn' size='30' maxlength='40' value='
$user[msn]' /></td>
  </tr>
  <tr>
    <td>Skype:</td>
    <td><input type='text' name='skype' size='30' maxlength='40' value='
$user[skype]' /></td>
  </tr>
  <tr>
    <td>AIM:</td>
    <td><input type='text' name='aim' size='30' maxlength='40' value='
$user[aim]' /></td>
  </tr>
  <tr>
    <td>deviantART:</td>
    <td><input type='text' name='deviantart' size='30' maxlength='40' value='
$user[deviantart]' /></td>
  </tr>
  <tr>
    <td>Yahoo:</td>
    <td><input type='text' name='yahoo' size='30' maxlength='40' value='
$user[yahoo]' /></td>
  </tr>
  
  <tr>
    <td colspan='2'><left>
        <input type='submit' value='Update'>
    </left></td>
  </tr>
</table>
</form>"
;
}
}
else
{
echo 
"You are not logged in.";
}
echo 
"<left>";
?>
</div>
</p>

</div>
<div id="footer">
<p><a href="../contact.php">Contact Us</a>
<a href="http://creativecommons.org/licenses/by-nc-nd/2.5/ca/">&copy; 2007 Raine Photography</a></p>
</div>

</div>
</body>
</html>
No more comments to show.