General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 9th, 2003, 03:11 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
edit profile not working

okay i have an edit profile page it grabs the users info from the session database and then fills in the blanks of the form to be resubmitted where the username is the same or whatever. i think that's all good. but when I try to edit, i get this:

Forbidden
You don't have permission to access /prp/method="post" on this server.
--------------------------------------------------------------------------------

Apache/1.3.26 Server at localhost Port 80

why don't I have permission? I can add a NEW user. I can change other things through post. whats going on here? thankls guys this is the best forum.

Reply With Quote
  #2  
Old June 10th, 2003, 06:46 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Would you mind posting your code? It would give me a better idea... But I'm thinking it may have to do with your form tag...
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old June 12th, 2003, 09:32 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
the code

here thanks:

PHP Code:
<?php require_once('Connections/users.php'); ?>
<?php
mysql_select_db
($database_users$users);
$query_Recordset1 "SELECT * FROM `session`, users";
$Recordset1 mysql_query($query_Recordset1$users) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);

if(
$_POST['what'] == 'process')
  {
    if(
$_POST['strPassword'] == $_POST['strPasswordConfirm'])
      {
        
$dbVars = new dbVars;
           @
$svrConn mysql_connect($dbVars->strServer$dbVars->strUser$dbVars->strPass);
               if(
$svrConn)
                    { 
                       
// Connected to the database server OK
                         
$dbConn mysql_select_db($dbVars->strDb$svrConn);
                            if(
$dbConn)
                                {
                                  
$password md5($_POST['strPassword']);
                                 
$strQuery "INSERT INTO users WHERE username ='" $_POST['strUserName'] . "'(";
                                
$strQuery .= "`password`, `firstname`, `lastname`, `location`, `age`) VALUES (";
                                
$strQuery .= "'$password', '{$_POST['strFirstName']}', '{$_POST['strLastName']}', '{$_POST['strLocation']}', '{$_POST['strAge']}')";
                                    if(
mysql_query($strQuery))
                                        {
                                            
?>

<span class="title">Profile Updated!</span></span><br>
<br>You have successfully updated your Profile!<br>
<a href="index.php">Continue</a>
<?php } } } } else { ?>

<span class="title">Error</span><br><br>
Sorry, but the passwords you supplied did not match. Please use the link below to return.<br><br>
<a href="index.php?page=registration">Back</a>
<?php } } else {

  function 
MatchUp()
       {
         
$changeIt = @mysql_query("SELECT * FROM users WHERE userId ='" $strMethod "'") or die ("couldn't do it");
          while (
$changeRow mysql_fetch_row($changeIt))
              { 
$changeIt2 = @mysql_query("SELECT * FROM `session` WHERE username = '" $changeRow[1] . "'") or die ("couldn't do this");
                while (
$changeRow2 mysql_fetch_row($changeIt2))
                 {     
$strMethod2 $changeRow2[1]; } }
                    
header("Location: index.php?page=editprofile&strMethod=$strMethod2");
        }
                    
  function 
NoMatchUp()
  {
      if (
$_GET['strMethod'])
   {
    
$verifyUser = @mysql_query("SELECT * FROM `session` WHERE sessionid = '" $_GET['strMethod'] . "'");
     while (
$userRow mysql_fetch_row($verifyUser))
      { 
$verifyUser2 = @mysql_query("SELECT * FROM users WHERE username = '" $userRow[2] . "'");
        while (
$userRow2 mysql_fetch_row($verifyUser2))
         {     
$handle $userRow2[1];
             
$location $userRow2[7];
            
$fname $userRow2[4];
            
$lname $userRow2[5];
            
$age $userRow2[8];
            
$method $userRow[6]; } }
?>
<span class="title">
<tr><td width='100%' bgcolor='#66B4F4'>Edit Profile</td></tr><br></span>
<table width="34%" border="0">

  <!-- <a href="index.php?page=getfiles">*Upload a Picture*</a> -->
  
  <form action=<?php "index.php?page=editprofile&strMethod='" $method "'" ?> method="post">
    <input type="hidden" name="what" value="process">
    <tr> 
      <td width="16%"><strong>UserName&nbsp;&nbsp;</strong></td>
      <td><input type="text" name="strUserName" value="<?php echo $handle?>"></td>
    </tr>
    <tr> 
      <td width="16%"><strong>Password&nbsp;&nbsp;</strong></td>
      <td width="84%"><input type="password" name="strPassword" value=""></td>
    </tr>
    <tr> 
      <td width="16%"><strong>Confirm Password&nbsp;&nbsp;</strong></td>
      <td width="84%"><input type="password" name="strPasswordConfirm" value=""></td>
    </tr>
    <tr> 
      <td width="16%"><strong>Location&nbsp;&nbsp;</strong></td>
      <td><input type="text" name="strLocation" value="<?php echo $location?>"></td>
    </tr>
    <tr> 
      <td width="16%"><strong>Age&nbsp;&nbsp;</strong></td>
      <td><select name="strAge" value="<?php echo $age?>">
          <option value="13">13</option>
          <option value="14">14</option>
          <option value="15">15</option>
          <option value="16">16</option>
          <option value="17">17</option>
          <option value="18">18</option>
          <option value="19">19</option>
          <option value="20">20</option>
          <option value="21">21</option>
          <option value="22">22</option>
          <option value="23">23</option>
          <option value="24">24</option>
          <option value="25">25</option>
          <option value="26">26</option>
          <option value="27">27</option>
          <option value="28">28</option>
          <option value="29">29</option>
          <option value="30+">30+</option>
        </select></td>
    </tr>
    <tr> 
      <td width="16%"><strong>First&nbsp;Name&nbsp;&nbsp;</strong></td>
      <td><input type="text" name="strFirstName" value="<?php echo $fname?>"></td>
    </tr>
    <tr> 
      <td width="16%"><strong>Last Name&nbsp;&nbsp;</strong></td>
      <td><input type="text" name="strLastName" value="<?php echo $lname?>"></td>
    </tr>
    <tr> 
      <td width="16%"></td>
      <td><input type="submit" value="Edit"></td>
    </tr>
  </form>
<tr width='84%'><td width='100%'><font size="1">Note : Changing your password } } }
 will delete your current
 password and replace it with a new one. Be sure to remember it!</font></td>
 <td width='84%'><font size="1">Note : Also be sure to enter your correct Username, or the profile will not update correctly!</td></tr></table>
                        
<?php
 
if($IsLoggedIn)
 {    
  
$strMethod $_GET['strMethod'];
  
$strEditMethod $_GET['strEditMethod'];
    switch(
$strEditMethod)
        {
            case 
"adminEdit":
                
MatchUp();
                break;
            default:
                
NoMatchUp();
                break;
        }
    } else {
    echo 
'You are not authorized to view this page. 
    This is most likely due to not being 
    <a href="index.php?page=login">Logged In</a>.'
;
    }
//mysql_free_result($Recordset1);
?>

thanks man
i hope this helps

Reply With Quote
  #4  
Old June 21st, 2003, 04:59 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
is it the form tag..?

hey sorry to add another post, I was wondering if anyone could help me, I'm still having the same problem, I don't understnad it, I can add new users and everything, could always use post before...
__________________
hey it's the CHARKING

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > edit profile not working


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway