Jul 25, 2008

Php Sessions And Post Variables Issues - My script dosent seem to work as intended

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Php Sessions And Post Variables Issues - My script dosent seem to work as intended

sonesay
You can test it out for yourself at http://sonesay.trap17.com/application.php

I've been working on this page locally and it seems to be working fine but when I upload it to my trap17 account the post variables dont get saved properly. Fill in some fields and submit it, the form will come up as a empty field yet when you resubmit it without any modifications and the data you entered in orginally will now magically appear, resubmit it again and it will be gone.

This is really annoying as I have no clue why it would be doing this when it seems to work fine locally.

application.php
CODE
<?php
/*

Application page
===================
uses _core.php
uses includes/application_content.php for content


*/
session_start();
include('db.php');



// page settings
$title = 'Application';
$location = 'application.php';
$lu_title = 'Login';
$ru_title = 'News';
$lp_title = 'Navigation';
$cp_title = $title;
$rp_title = 'Events';

$content = 'includes/application_content.php';


include('_core.php');

?>


_core.php
CODE
<?php


// output page

echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
&lt;script type='text/javascript' src='ext-1.1.1/adapter/yui/yui-utilities.js'></script>
&lt;script type='text/javascript' src='ext-1.1.1/adapter/yui/ext-yui-adapter.js'></script>
&lt;script type='text/javascript' src='ext-1.1.1/ext-all-debug.js'></script>

&lt;script type='text/javascript' src='jquery-1.2.1.min.js'></script>
&lt;script type='text/javascript' src='date.js'></script>
<!--[if IE]>&lt;script type='text/javascript' src='jquery.bgiframe.min.js'></script><![endif]-->
&lt;script type='text/javascript' src='jquery.datePicker.js'></script>

<link href='nexus_main.css' rel='stylesheet' type='text/css' />
<link rel='stylesheet' type='text/css' media='screen' href='datePicker.css'>
<link rel='stylesheet' type='text/css' media='screen' href='demo.css'>

<title>$title</title>
</head>


<body>


<div id='upper_bg'>
</div>
<div id='outer'>
<!-- main container -->


<div id='header'>
<div id='upper_left_pan'>
<div id='upper_left_title'>$lu_title</div>
<div id='upper_left_content'>
<div id='login_section'>
<p>
Not logged in, Please login below <br />
Username: <input type='text' /><br />
Password: <input type='password' /><br />
<button disabled='disabled'>Login</button>
</p>
</div>
</div>
</div>
<div id='header_right_pan'>
<div id='upper_right_title'>$ru_title</div>
<div id='upper_right_content'><p>No news to display</p></div>
</div>

</div>


<!-- content container -->


<div id='content'>
<div id='left_pan'>

<div class='side_panel_top'>
<div class='side_panel_title'>$lp_title</div>
</div>
<div class='side_panel_middle'>


";


// include navigation
include('includes/nav_list.php');


echo "


</div>
<div class='side_panel_bottom'>
</div>



</div>
<div id='right_pan'>
<div class='side_panel_top'>
<div class='side_panel_title'>$rp_title</div>
</div>
<div class='side_panel_middle'>
<div class='side_panel_right_content'>
<p>
No Current events to display.
</p>
</div>
</div>
<div class='side_panel_bottom'>
</div>
</div>
<div id='middle_pan'>
<div class='center_panel_top'>
<div class='center_panel_title'>$cp_title</div>
</div>

<div class='center_panel_middle'>
<div class='center_panel_content'>";

// Content includes
if($content != '') {
include($content);
}




echo"

</div>
</div>

<div class='center_panel_bottom'>
</div>

</div>



</div>



<!-- main container end -->
</div>

</body>
</html>";
// end page

?>



application_content.php
CODE
<?php
/*
Description
------------
File contains an application form for users to register, Is used by application.php



Contents
----------
1. Functions

2. Application Form
// Part 1
2.1 Display Empty form
2.2 Check and Dsiplay form with any ERRORS if any
2.2.1 display form with errors
2.2.2 display from with no errors, user has to confirm info then moved to Part 2
// Part 2
2.3 display details from part 1 (just for display pruposes making sure details are stored.)

*/
$s = $_SESSION;
include('includes/class/userClass.php');



// 1. FUNCTIONS

function ck_app_username($uname) {

global $link;

// check if user already exisit
$user_ck_query = "SELECT u_name FROM user WHERE u_name ='" . $uname . "'";
$user_ck_result = mysql_query($user_ck_query, $link);

$ck_result = "Default";
$pattern = "/[!|@|#|$|%|^|&|*|(|)|_|\-|=|+|\||,|.|\/|;|:|\'|\"|\[|\]|\{|\}]/i";

// check for input
if($uname == '') {
$ck_result = "<span class='error_header'>Required!</span>";
$app_errors['username'] = true;
}
else if (preg_match($pattern, $uname)) {
$ck_result = "<span class='error_header'>illegal characters</span>";
$app_errors['username'] = true;
}
else if (preg_match("/[0-9]/", $uname)) {
$ck_result = "<span class='error_header'>No numbers in username!</span>";
$app_errors['username'] = true;
}
else if (strlen($uname) < 3) {
$ck_result = "<span class='error_header'>3 Characters minimun!</span>";
$app_errors['username'] = true;
}
else if (mysql_num_rows($user_ck_result) > 0) {
$ck_result = "<span class='error_header'>User Exist!</span>";
$app_errors['username'] = true;
}
else {
$ck_result = "<span class='ok_header'>Available</span>";
unset($app_errors['username']);
}

return $ck_result;
}


function ck_app_password($pwd,$cpwd) {
// version 1.0
$app_password_result = "default";

// check password
if($pwd == '' || $cpwd == '') {
$app_password_result = "<span class='error_header'>Enter password and confirm!</span>";
$app_errors['password'] = true;
}
// user submitted something
else if ($pwd != $cpwd) {
$app_password_result = "<span class='error_header'>Passwords do not match!</span>";
$app_errors['password'] = true;
}
// check for minimun chars for password 6
else if (strlen($pwd) < 6) {
$app_password_result = "<span class='error_header'>Passwords must be 6 characters or more!</span>";
$app_errors['password'] = true;
}
// all checks done password ok
else {
$app_password_result = "<span class='ok_header'>OK!</span>";
unset($app_errors['password']);
}

// return result
return $app_password_result;
}


function ck_name($name) {
$ck_name_result = 'Default';
$regex = "/[^a-zA-Z]/";


if($name == '') {
$ck_name_result = "<span class='error_header'>Required!</span>";
$app_errors['name'] = true;

}
else if(preg_match($regex,$name)) {
$ck_name_result = "<span class='error_header'>Error. a-z A-Z only!</span>";
$app_errors['name'] = true;
}
else {

$ck_name_result = "<span class='ok_header'>OK</span>";
unset($app_errors['name']);
}
return $ck_name_result;
}



function ck_email ($mail) {
//default
$ck_email_result = "Default";
//pattern
$regex = '/\A(?:[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+'
.'(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@'
.'(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2}|'
.'com|org|net|gov|biz|info|name|aero|biz|info|jobs|'
.'museum)\b)\Z/i';

if ($mail == '') {
$ck_email_result = "<span class='error_header'>Email Required!</span>";
$app_errors['email'] = true;
}
else if (preg_match($regex, $mail)) {
$ck_email_result = "<span class='ok_header'>OK!</span>";
$app_errors['email'] = true;
}
else {
$ck_email_result = "<span class='error_header'>Invalid Emai!</span>";
unset($app_errors['email']);
}

return $ck_email_result;
}

// END FUNCTIONS =======



// 2. APPLICATION FORM ================================================================================
============


// 2.1 DISPLAY EMPTY FORM
if(count($p) == 0) {
echo "
<h1>Personal Details - Part 1 of 5</h1>
<p>
Fill in all the fields below. Make sure you have read and understood the <a href='rules.php'>rules</a> before posting an application to join the Linkshell(s).
</p>

<form name=\"app_form\" method=\"post\" action=\"application.php\">
<input type=\"hidden\" name=\"app_stage\" value=\"1\" />


<ul class=\"app_details\">
<li class=\"col1\">Desired Username</li>
<li><input type=\"text\" name=\"app_username\" /></li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Password</li>
<li><input type=\"password\" name=\"app_password\" /></li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Comfirm Password</li>
<li><input type=\"password\" name=\"app_cpassword\" /></li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">First Name</li>
<li><input type=\"text\" name=\"app_fname\" /></li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Last Name</li>
<li> <input type=\"text\" name=\"app_lname\" /></li>
</ul>


&lt;script language='javascript' type='text/javascript'>
$(function()
{
$('.date-pick').datePicker({startDate:'01/01/1950'});
});
</script>

<ul class=\"app_details\">
<li class=\"col1\">DOB</li>
<li><input type=\"text\" size=\"10\" name=\"app_dob\" class='date-pick' value='' readonly='readonly' /></li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Gender</li>
<li> <select name=\"app_gender\" />
<option value=\"m\">Male</option>
<option value=\"f\">female</option>
</select>
</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Email</li>
<li> <input type=\"text\" name=\"app_email\" /> $email_result</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\"></li>
<li><button>Submit</button></li>
</ul>
</form>
";
}


// 2.2 Display form with any errors ============================================

else if((count($p) > 0) && ($p['app_stage'] < 2 )){

$app_username = strtolower($p['app_username']);
$_SESSION['app_username'] = htmlspecialchars($app_username);
$_SESSION['app_password'] = $p['app_password'];
$_SESSION['app_cpassword'] = $p['app_cpassword'];
$_SESSION['app_fname'] = $p['app_fname'];
$_SESSION['app_lname'] = $p['app_lname'];
$_SESSION['app_gender'] = $p['app_gender'];
$_SESSION['app_dob'] = $p['app_dob'];
$_SESSION['app_email'] = $p['app_email'];

if ($p['app_stage'] == 1) {
// check results
if(!isset($s['app_errors'])) {
$s['app_errors'] = array();
}
$app_errors = $s['app_errors'];
//username
$username_result = ck_app_username($s['app_username']);
if($username_result == "<span class='ok_header'>Available</span>") {
unset($app_errors['username']);
}
else{
$app_errors['username'] = true;
}
//password
$password_result = ck_app_password($s['app_password'],$s['app_cpassword']);
if($password_result == "<span class='ok_header'>OK!</span>") {
unset($app_errors['password']);
}
else{
$app_errors['password'] = true;
}
// names
$fname_result = ck_name($s['app_fname']);
$lname_result = ck_name($s['app_lname']);
//email
$email_result = ck_email($s['app_email']);
if($email_result == "<span class='ok_header'>OK!</span>") {
unset($app_errors['email']);
}
else{
$app_errors['email'] = true;
}



// 2.2.1 Display application with ERRORS ==========================================
if(count($app_errors) > 0) {

echo "

<h1>Personal Details - Part 1 of 5</h1>

<p>
There are <span class='error_header'>errors</span> please correct and resubmit.
</p>


<form name=\"app_form\" method=\"post\" action=\"application.php\">
<input type=\"hidden\" name=\"app_stage\" value=\"1\" />


<ul class=\"app_details\">
<li class=\"col1\">Desired Username</li>
<li><input type=\"text\" name=\"app_username\" value=\"{$s['app_username']}\" /> $username_result</li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Password</li>
<li><input type=\"password\" name=\"app_password\" value=\"{$s['app_password']}\" /></li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Comfirm Password</li>
<li><input type=\"password\" name=\"app_cpassword\" value=\"{$s['app_cpassword']}\" /> $password_result</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">First Name</li>
<li><input type=\"text\" name=\"app_fname\" value=\"{$s['app_fname']}\" /> $fname_result</li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Last Name</li>
<li> <input type=\"text\" name=\"app_lname\" value=\"{$s['app_lname']}\" /> $lname_result</li>
</ul>



&lt;script language='javascript' type='text/javascript'>
$(function()
{
$('.date-pick').datePicker({startDate:'01/01/1950'});
});
</script>



<ul class=\"app_details\">
<li class=\"col1\">DOB</li>
<li><input type=\"text\" size=\"10\" name=\"app_dob\" value=\"{$s['app_dob']}\" class='date-pick' readonly='readonly' />
</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Gender</li>
<li> <select name=\"app_gender\" />
";
// check if gender selected
if($p['app_gender'] == 'f') {
echo "<option value=\"f\">female</option>
<option value=\"m\">Male</option>
";
}
else {
echo "<option value=\"m\">Male</option>
<option value=\"f\">female</option>
";
}



echo "
</select>
</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Email</li>
<li> <input type=\"text\" name=\"app_email\" value=\"{$s['app_email']}\" /> $email_result </li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\"></li>
<li>
<button>Re-submit</button>
</li>
</ul>
</form>
";
}
// 2.2.2 Display application form with 0 ERRORS ==========================================
else {



echo "

<h1>Personal Details - Part 1 of 5</h1>
<p>
Please confirm details and submit, If there are any changed needed to be made hit the back button now.
</p>


<form name=\"app_form\" method=\"post\" action=\"application.php\">
<input type=\"hidden\" name=\"app_stage\" value=\"2\" />


<ul class=\"app_details\">
<li class=\"col1\">Desired Username</li>
<li><input type=\"text\" name=\"app_username\" value=\"{$s['app_username']}\" disabled='disabled' /> $username_result</li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Password</li>
<li><input type=\"password\" name=\"app_password\" value=\"{$s['app_password']}\" disabled='disabled' /></li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Comfirm Password</li>
<li><input type=\"password\" name=\"app_cpassword\" value=\"{$s['app_cpassword']}\" disabled='disabled' /> $password_result</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">First Name</li>
<li><input type=\"text\" name=\"app_fname\" value=\"{$s['app_fname']}\" disabled='disabled' /> $fname_result</li>
</ul>
<ul class=\"app_details\">
<li class=\"col1\">Last Name</li>
<li> <input type=\"text\" name=\"app_lname\" value=\"{$s['app_lname']}\" disabled='disabled' /> $lname_result</li>
</ul>



&lt;script language='javascript' type='text/javascript'>
$(function()
{
$('.date-pick').datePicker({startDate:'01/01/1950'});
});
</script>



<ul class=\"app_details\">
<li class=\"col1\">DOB</li>
<li><input type=\"text\" size=\"10\" name=\"app_dob\" value=\"{$s['app_dob']}\" disabled='disabled' />
</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Gender</li>
<li> <select name=\"app_gender\" disabled='disabled'/>
";
// check if gender selected
if($p['app_gender'] == 'f') {
echo "<option value=\"f\" >female</option>
<option value=\"m\">Male</option>
";
}
else {
echo "<option value=\"m\" >Male</option>
<option value=\"f\">female</option>
";
}



echo "
</select>
</li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\">Email</li>
<li> <input type=\"text\" name=\"app_email\" value=\"{$s['app_email']}\" disabled='disabled' /> $email_result </li>
</ul>

<ul class=\"app_details\">
<li class=\"col1\"></li>
<li>
<button>Continue to Part 2</button>
</li>
</ul>
</form>
";
}

}

}
// 2.3 Display stored personal details from part 1
else if (count($p) > 0 && $p['app_stage'] == 2) {
$post_count = count($p);

// 2.3.1 int User

$app_user = new user;
$app_user = $_SESSION['app_user'];


$app_user->username = $_SESSION['app_username'];
$app_user->password = $_SESSION['app_password'];
$app_user->fname = $_SESSION['app_fname'];
$app_user->lname = $_SESSION['app_lname'];
$app_user->gender = $_SESSION['app_gender'];
$app_user->dob = $_SESSION['app_dob'];
$app_user->email = $_SESSION['app_email'];

echo "

<h1>FFXI Game Details - Part 2 of 5</h1>
<p>
Part 2
</p>
<p>
$app_user->username <br />
$app_user->fname <br />
$app_user->lname <br />
$app_user->gender <br />
$app_user->dob <br />
$app_user->email <br />
</p>

";
}




?>







After a V drink and having another go at it I find the solution. Instead of printing back out $_SESSION['var'] into the form fields value, I changed it to $_POST['var'] and it works. I guess I cant rely on the sessions vars being asigned properly even though it works on my localhost. Ah another PHP problem of my programming career out of the way.

 

 

 


Reply

shadowx
Im glad to see you've solved it, one thing to remember is that at T17 POST and GET variables arent assigned to their variable name eg:

On my localhost i have a HTML page that creates the $username variable using the POST method of a form and links to the below code in PHP and it works fine:

CODE
echo "hello $username";


But on T17 the $username variable would be blank here because i need to use the POST array to get it out:

CODE
$username = $_POST['username'];
echo "hello $username";


This would work. I had major headaches because of this fact and then realiser it was a security concern to have it get them automatically from the POST and GET arrays. The setting is in the PHP.ini file in your localhost folders somewhere so you can change it yourself but i dont know the name so maybe someone else can help. Im not sure if this affects your scripts because i couldn't tell which variables were passed from POST and which weren't but its a thing to remember if you have this problem or if anyone else does.

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : php, sessions, post, variables, issues, script, dosent, work, intended

  1. Php Guest Online Script
    (2)
  2. Trap17's 400000th Post Giveaway!
    (12)
    As Jlhaslip pointed out in the shoutbox, trap17 has reached 400,000 posts! AND THIS IS IT!
    THE 400,000th post! I was actually looking for a reason to start up another giveaway and now
    I have one! There are 60 credits up for grab! Now those 60 aren't going to all be
    given away to one person. Below I have a crossword puzzle with 30 trap17 related questions. So
    here is the challenge: find as many words as you can. For every word you find you will be given 2
    credits. Make sure to list your answers in quote tags and add a paragraph or tw....
  3. My Thoughts On Few Browsers
    A quick review on browsers I've tried (post your own too) (2)
    Ok, I currently use Firefox 3 because I think it has the most features, security and it is fast!
    I thought I should start a topic (and I don't know if there is one like it) in which I talk, and
    you guys too, about the browsers that are out there for any OS. So, I'm going to start off by
    saying a few things about internet browsers that I have tried in the past. Internet Explorer
    (Windows)- This is build into Windows when you first turn on your computer. I think it starts up
    fast, but has a few flaws- which I will reach in a minute. The things that I like are....
  4. Mailserver Fails To Work
    (1)
    I've my Domains hosted in Trap17. My Account is suspended due to lack of enough points, but I
    was able to use the Google Apps for Domains for checking out my mail. But recently I'm not able
    to send or receive any mail, I think the problem is in the MX Record which I've set in trap17
    cPanel. When I access my domain http://laschatz.info/ I get the Account suspended page which is
    the usual page, but I'm not getting that page when I access my Addon Domains xatre.info, it is
    pointing to ComputingHostst name servers. Is there anything I need to do to make ....
  5. Post Your Banners Here
    Banner Topic (1)
    I will show you my sigs and banners and you post yours. Please rate. Other is in my Sig....
  6. Why Doesn't This Code Work On Computinghost?
    (2)
    Here is the script: Rcon Connection Client IP: Port: Password Cmd:
    $ip = $_POST ; if (!$ip) die(); $port = $_POST ; if
    (!$port) die(); $pass = $_POST ; if (!$pass) die(); $passlen =
    strlen($pass); $cmd = $_POST ; if (!$cmd) die(); $cmdlen =
    strlen($cmd); $packet = 'SAMP'; $packet .= chr(strtok($ip,
    '.')).chr(strtok('.')).chr(strtok('.')).chr(strtok('.'));
    $packet .= ch....
  7. User Name
    blimey this is the hardest work ever (0)
    Hi, I knew nothing about chaos until I signed up (and paid for my web space Order #2486 >
    Invoice #6589) with you and I drive in London for a living ... 8 hours after sign up and still
    don't know whether my User name and password work on cPanel or anywhere on this site for that
    matter. I would suggest that the admin send out an introductory eMail on sign up with all our info
    and put a sticky on at the start page of the forum containing standard info for all users. Like FTP
    eMail and cPanel settings. The other thing that's fascinating is the 3 domains us....
  8. Phpizabi Social Network Script
    (1)
    Hello everyone not been on for AGES! we had net problems and i had to move to qupis and now
    I've got problems. I'm making a social networking site using this script and I cant get it
    to install Everytime I go to the install page i get this QUOTE Warning: session_start() :
    open_basedir restriction in effect. File(/home/kasiks1/tmp) is not within the allowed path(s):
    (/home/karlos:/usr/lib/php:/usr/local/lib/php:/tmp) in
    /home/karlos/public_html/phpazi/install/index.php on line 1 Fatal error: session_start() : Failed
    to initialize storage module: file....
  9. How To Make A View New Post Script?
    (5)
    Ok so i'm still working on the forum software i posted about a while back, but I have no idea
    how to do this. I want to make a view new post script, as this is one of the main things that my
    forum software dose not have that all other forums have. so does any body have an idea on how i
    would do this? Thanks.....
  10. Amazing Software
    I found this amazing software, if you work with flash.. (0)
    If you work with flash, this is the coolest software i seen.. You can make amazing things for the
    desktop.. check it out.. www.swfmagician.com ....
  11. Advice On A Girl From Work.
    (9)
    So there's this girl at work, we'll call her Shaniqua. I work relatively close to Shaniqua
    several days a week. We've become pretty good friends and hang out once in a while. We text/chat
    all the time, etc. The problem is Shaniqua is drop dead gorgeous. I mean like a perfect 10 model.
    I'm not a bad looking guy by any means, but I'm not Patrick Dempsey either. She's
    constantly getting hit on/asked out by other guys from school (university) and work and she always
    turns them down straight away (granted they're usually annoying or prodding too mu....
  12. Post Some Wierd Experiences At Night You've Had In Here.
    WIERD!!! (2)
    Here are a couple of Experiences I've had at night. I was 2 years old living in British
    Columbia, Canada. I lived in a two story house, all of the bedrooms where we slept were upstairs. My
    parents told me that I slept in their room in a crib right beside the window, they also said that if
    I stood up, I could look outside and see our front door. Not many people remember what happened when
    they were at the age of 2, but this is one very vivid memory that I have yet to forget. It was late
    at night and I had just awoken from my sleep, I had a tendency not to cry when ....
  13. Database With Mysql++
    getting mySQL++ to work with trap17 (7)
    Hi, I'm trying to build an online game and figured the easiest way to do the server list would
    be to make a mySQL database for it; however, I use the con() command on the IP i get from pinging my
    website and I always get an abnormal program termination; however, it will work with the mySQL on my
    own machine. The code is below: CODE #include <iostream> #include <iomanip>
    #include <mysql++> #include "pass.h"//holds my password (i program at
    school) int main(void) {     Connection con("t3jem3_test","....
  14. Ie 7 Issue With Ajax
    Some ajax calls dont seem to work (2)
    function reload_char() { race_id = Ext.get('race').dom.value; gender =
    Ext.get('race_gender').dom.value; face = Ext.get('race_face').dom.value; hair_id =
    Ext.get('race_hair').dom.value; // race race_letter =
    Array('H','E','T','M','G'); race = race_letter ; /*
    //gender if(race == 'G' || race == 'M') { gender = ''; } //hair
    if(hair_id == 1) { hair = 'a'; } else { hair = 'b'; } image =
    '80px-'+race+gender+face+hair+&....
  15. Loaing Script
    (3)
    hello, I'm looking for a preloader script for my site. like it will display an loading
    image while the site is loading and the once the page has loaded the image will disapear. i tryed
    searching for one on google but i could not find one, i think i searched for the worng thing. if
    some one knows how to make one or where i can find one that would be great. Thanks....
  16. Post Your Favorite Easy To Make Meal.
    add ingredients and instructions (16)
    Heres mine =) TATER TOT HOTDISH Ingredients. A bag of tator tots. 2 cans of cream of mushroom
    soup (any cream soup can be substituted for optional flavor) 2 lb. of ground beef 1 can of corn (or
    any other desired vegetable(s)) Instructions. Cook the hamburger and strain the fat. Spread the
    hamburger into a baking dish then pour the soup and can of vegetables over. Stir until mixed well.
    Cover the mixture with tator tots and Bake for the amount of time it says for the tator tots to get
    done and add 5 minutes. (or until mixture is boiling and tator tots are crisped.)....
  17. Invite Script..
    (2)
    I didn't know where else to put it /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" /> If moderators find another forum more suitable plz move this one
    /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I am looking
    for some sort of sript or program that let's people on your website invite friends. Like they
    put in their Emailadress and mails are send to everyone in their list.. I hope someone can help me
    /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Greetzz....
  18. Background Image Swap Script
    Change a Background Image based on clock time (15)
    Background Image Changer Script To swap the background image from your CSS file according to the
    Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
        background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
    folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
    create an index.php file and copy/paste the following script. CODE <?php $hour =
    date('H'); if ($hour < 12 ) {     $image =
    "morning.png"; } ....
  19. Html Code Tester. Online Script
    (15)
    Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if
    this works. I have not tested it yet, but I will later and post back with a demo and fix it up.
    Current script: CODE <?php //Save this as something like htmltest.php function
    CheckForm() { $html_unsafe=$_POST['code']; //Gives us our user
    input $html_safe=str_replace("<?php"," ",$html_unsafe);
    //Starts security measures $html_safe=str_replace("?>","
    ",$html_sa....
  20. Ctrl + C Will Not Work
    Windows Xp Pro SP2 (17)
    I recently built a computer, everything seems to be alright with it, except one thing, CTRL + C just
    won't work. I'm running a Windows Windows Xp Pro SP2, and Ctrl + X and Ctrl + V work fine.
    I mean, I could probably just cut and paste anything I want to copy but it seems like such a hassle.
    Has anyone came across this problem before? Or know how to fix it?....
  21. Evilboard (forum Software) - Multiple Categorys - Don't Work :(
    I am creating a forum and i can't fix more then 1 category. (6)
    I am at the moment trying to program my own forum, but i need more then a single category, here is
    my source: CODE function cat () { include("functions/functions.php");
    echo '<table width="100%"  border="0" cellspacing="0">
    <tr> <td class="eb_top" colspan="3" style="border-bottom-width:
    0; height: 30px; font-size: 12px;"> <b>Forum</b></td>
    </tr>';      global $catid;   $db = new db;   $db->connec....
  22. Get Paid To Post On Forums?
    Links, Resources for Pay for Writing, Earn from Forums (17)
    Get Paid to Post on Forums I have seen these all over, could people maybe give me a
    short list on where I could post on forums and get paid? I am a freelance writer, and I know this
    is one option. I tried searching it, but word of mouth always works best. Thanks in advance!
    Note: Please move if needed, I wasn't sure if I should do it in the Make Money forum, or not.
    At Trap17.com - This very site, You get paid in terms of CREDITS. These credits are used to keep up
    your Web Hosting account (which we give for FREE). The Web Hosting is of top ....
  23. Linux Question: Amarok And File Permissions
    please help, i can't get it to work with all music files (4)
    hey, i use to use Linux DC++ to download music from some hubs and i usually download it to
    /home/downloads/ and then i move the files to my collection on another HDD a sata one, on
    sda3/music/ but when i move the files using krushader root mode they become posessed by root and
    amarok can't play them displaying a locker on the file's icon. I tried to " chmod 774 music
    ", where music is my music directory, as root in konsole but no luck. What should i do to make a
    whole directory accessible from amarok as user?....
  24. Watermark Your Image With Simple Php Script
    found it on the net (34)
    This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips &
    Scripts site. Just in case the site may not show, I will include the code here: List of things
    needed: 1. your image in any format 2. watermark image--in gif format with transparent background 3.
    script below with name (i.e. watermark.php) CODE <?php // this script creates a watermarked
    image from an image file - can be a .jpg .gif or .png file // where watermark.gif is a mostly
    transparent gif image with the watermark - goes in the same directory as this script // ....
  25. Razr Problems
    Keypad Doesn't Work (17)
    Hello, Can anyone help me? I own a Motorola Razr V3 and the only key that works is the on off
    button. I have never dropped it and i take excellent care of my phones. It was working fine for a
    few months and one day it just stopped working. The screen still works and I can awnser phone calls
    by opening the flip part, but I can't call anyone or text or anything that requires pushing a
    button unless it is to turn it on or off. I hace looked online and it seemse other people ahve had
    this problem but no one ever had a solution. Should I try to fix it? Should I ....
  26. How To Make Your Pc Work Faster
    get your pc working unbelievably fast in 5 minutes !! (16)
    Here you can find useful tips you can do to make your pc work faster in a few minutes , just follow
    these tips and you will definitely have a much faster and more reliable PC! QUOTE 1.
    Wallpapers: They slow your whole system down, so if you're willing to compromise, have a basic
    plain one instead! 2. Minimizing: If you want to use several programs at the same time then
    minimize those you are not using. This helps reduce the overload on RAM. 3. Boot Faster: The
    'starting Windows 9x , xp' message on startup can delay your booting for a couple ....
  27. The Most Annoying Website
    post the most annoying website you've encountered here (57)
    As you know, there are quite a few websites out there, some are professional while others are not so
    professional. This is where you come in. Have you ever been to a website where it was so bad that
    you had to use your hands to cover the annoying content? I know I had. This website that I visited
    today , in my opinion, tops the list in annoying websites. The links (and there are a lot of them)
    blinks. That's right, this author uses the tag so all links blink. Because of this technique,
    the majority of the site is very hard to read which is why I nominate http://....
  28. Games = Tough Work?
    Do You Sweat Whilst Playing Games? (21)
    Well a few weeks ago I was playing Tony Hawk's Underground 2 on my Xbox and I was furiously
    trying to beat my high record combo. After about a hour of this I was actually sweaty and I just
    felt like stopping playing and have a shower. Does anyone else sweat when they play games?
    Message from snlildude87: /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' />
    ....
  29. Could Someone Make A Php Script For Me?
    Script to manage clans and players (3)
    Does someone know a script where you can 1. Add clans to a roster 2. Edit clans on a roster 3. Add
    players too a clan 4. Edit players 5. Schedule matches 6. Add clan Leaders to manage their own clan
    + members 7. Add members to edit their own information And maybe some sort of scoreboard integrated
    where you can put Wins, Draws and loses and that automaticly puts best clans on the top? If there
    isnt such a script could someone create 1 for me? (its for a league ^^)....
  30. **** Read Before You Post! ****
    THIS MAY AFFECT YOUR HOSTING CREDITS (47)
    These rules were re-written by Dooga THESE RULES ARE IMPORTANT! FAILING TO READ THESE NOTES
    WILL RESULT IN YOUR HOSTING CREDITS TO BE DEDUCTED! This forum is a forum to post tutorials
    that YOU have written. You are NOT allowed to post a tutorial copied from another site,
    regardless of any reference you make! (However, you may PARAPHRASE it with correct
    referencing). Your tutorial is going to be moderated (that means, anything you post won't be
    viewable until a moderator has accepted it). Do not re-post your tutorials if they don't show
    up&....

    1. Looking for php, sessions, post, variables, issues, script, dosent, work, intended

Searching Video's for php, sessions, post, variables, issues, script, dosent, work, intended
Similar
Php Guest
Online
Script
Trap17's
400000th
Post
Giveaway!
;
My Thoughts
On Few
Browsers - A
quick review
on browsers
I've
tried (post
your own
too)
Mailserver
Fails To
Work
Post Your
Banners Here
- Banner
Topic
Why
Doesn't
This Code
Work On
Computinghos
t?
User Name -
blimey this
is the
hardest work
ever
Phpizabi
Social
Network
Script
How To Make
A View New
Post Script?
Amazing
Software - I
found this
amazing
software, if
you work
with flash..
Advice On A
Girl From
Work.
Post Some
Wierd
Experiences
At Night
You've
Had In Here.
-
WIERD!&#
33;!
Database
With Mysql++
- getting
mySQL++ to
work with
trap17
Ie 7 Issue
With Ajax -
Some ajax
calls dont
seem to work
Loaing
Script
Post Your
Favorite
Easy To Make
Meal. - add
ingredients
and
instructions
Invite
Script..
Background
Image Swap
Script -
Change a
Background
Image based
on clock
time
Html Code
Tester.
Online
Script
Ctrl + C
Will Not
Work -
Windows Xp
Pro SP2
Evilboard
(forum
Software) -
Multiple
Categorys -
Don't
Work :( - I
am creating
a forum and
i can't
fix more
then 1
category.
Get Paid To
Post On
Forums? -
Links,
Resources
for Pay for
Writing,
Earn from
Forums
Linux
Question:
Amarok And
File
Permissions
- please
help, i
can't
get it to
work with
all music
files
Watermark
Your Image
With Simple
Php Script -
found it on
the net
Razr
Problems -
Keypad
Doesn't
Work
How To Make
Your Pc Work
Faster - get
your pc
working
unbelievably
fast in 5
minutes
!!
The Most
Annoying
Website -
post the
most
annoying
website
you've
encountered
here
Games =
Tough Work?
- Do You
Sweat Whilst
Playing
Games?
Could
Someone Make
A Php Script
For Me? -
Script to
manage clans
and players
**** Read
Before You
Post!
**** - THIS
MAY AFFECT
YOUR HOSTING
CREDITS
advertisement



Php Sessions And Post Variables Issues - My script dosent seem to work as intended



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE