Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code doesn't execute until button triggered
- if(isset($_POST['nametb']) && isset($_POST['usernametb']) && isset($_POST['emailtb']) && isset($_POST['confirmtb']) && isset($_POST['abouttb']) && isset($_POST['interesttb']) && isset($_POST['dreamtb']) && isset($_POST['liketb']) && isset($_POST['schooltb']) && isset($_POST['schoolyrtb']) && isset($_POST['occupationtb']) && isset($_POST['occupationyrtb'])){
- $select_info = "SELECT * from user_info WHERE id='$user_id'";
- if($select_info_run = @mysql_query($select_info)){
- $namedb = mysql_result($select_info_run, 0, 'name');
- $usernamedb = mysql_result($select_info_run, 0, 'username');
- $emaildb = mysql_result($select_info_run, 0, 'email');
- $confirmdb = mysql_result($select_info_run, 0, 'email');
- $aboutdb = mysql_result($select_info_run, 0, 'about');
- $interestdb = mysql_result($select_info_run, 0, 'interest');
- $dreamdb = mysql_result($select_info_run, 0, 'dream');
- $likedb = mysql_result($select_info_run, 0, 'like');
- $schooldb = mysql_result($select_info_run, 0, 'school');
- $schoolyrdb = mysql_result($select_info_run, 0, 'schoolyr');
- $occupationdb = mysql_result($select_info_run, 0, 'occupation');
- $occupationyrdb = mysql_result($select_info_run, 0, 'occupationyr');
- }
- else{
- echo 'Server down :(';
- }
- }
- else{
- echo server down :(';
- }
- <form action="<?php if(isset($current_file)){ echo $current_file; } ?>" method="POST">
- <fieldset id="fieldset1">
- <legend style="font-family: Ubuntu; font-size:20px;">Info</legend>
- <label id="name" title="Name" for="textbox1">Name :</label>
- <label id="username" title="UserName" for="textbox2">UserName :</label>
- <label id="email" title="Email" for="textbox3">Email :</label>
- <label id="confirm" title="Confirm Email" for="textbox4">Confirm :</label>
- <br />
- <input type="text" id="textbox1" name="nametb" value="<?php if(isset($namedb)){ echo $namedb; } ?>" />
- <input type="text" id="textbox2" name="usernametb" value="<?php if(isset($usernamedb)){ echo $usernamedb; } ?>" />
- <input type="text" id="textbox3" name="emailtb" value="<?php if(isset($emaildb)){ echo $emaildb; } ?>" />
- <input type="text" id="textbox4" name="confirmtb" value="<?php if(isset($confirmdb)){ echo $confirmdb; } ?>" />
- <br /><br />
- <div id="hrln"><hr /></div>
- <label id="about" title="About you" for="textarea1">About :</label>
- <label id="interest" title="You are interested in?" for="textarea2">Interested in :</label>
- <br />
- <textarea id="textarea1" name="abouttb"><?php if(isset($aboutdb)){ echo $aboutdb; } ?></textarea>
- <textarea id="textarea2" name="interesttb"><?php if(isset($interestdb)){ echo $interestdb; } ?></textarea>
- <br /><br /><br /><br /><br /><hr />
- <label id="dream" title="Your Dream?" for="textarea3">Dream :</label>
- <label id="like" title="What do you like?" for="textarea4">You like :</label>
- <br />
- <textarea id="textarea3" name="dreamtb"><?php if(isset($dreamdb)){ echo $dreamdb; } ?></textarea>
- <textarea id="textarea4" name="liketb"><?php if(isset($likedb)){ echo $likedb; } ?></textarea>
- <br /><br /><br /><br /><br /><hr />
- <label id="education" title="Your school" for="textbox5">School | University :</label>
- <label id="educationyr" title="Year" for="textbox6">Year :</label>
- <br />
- <input type="text" name="schooltb" id="textbox5" value="<?php if(isset($schooldb)){ echo $schooldb; } ?>" />
- <input type="text" name="schoolyrtb" id="textbox6" value="<?php if(isset($schoolyrdb)){ echo $schoolyrdb; } ?>" />
- <br /><br /><hr />
- <label id="occupation" title="Occupation" for="textbox7">Occupation :</label>
- <label id="occupationyr" title="Year" for="textbox6">Year :</label>
- <br />
- <input type="text" id="textbox7" name="occupationtb" value="<?php if(isset($occupationdb)){ echo $occupationdb; } ?>" />
- <input type="text" id="textbox8" name="occupationyrtb" value="<?php if(isset($occupationyrdb)){ echo $occupationyrdb; } ?>" />
- <br /><br /><hr />
- <label id="passwords" title="For Security Purpose" for="textbox9">Password :</label>
- <input type="password" id="textbox9" name="passwordstb" />
- <input type="submit" value="Save Info Modification" name="save" id="button1" />
- <input type="submit" value="Cancel Info Modification" name="cancel" id="button2" />
- </fieldset>
- </form>
- if(isset($_POST['nametb']) && isset($_POST['usernametb']) && isset($_POST['emailtb']) &&
- isset($_POST['confirmtb']) && isset($_POST['abouttb']) && isset($_POST['interesttb']) &&
- isset($_POST['dreamtb']) && isset($_POST['liketb']) && isset($_POST['schooltb']) &&
- isset($_POST['schoolyrtb']) && isset($_POST['occupationtb']) &&
- isset($_POST['occupationyrtb'])){
Add Comment
Please, Sign In to add comment