User Profile

Collapse

Profile Sidebar

Collapse
clai83
clai83
Last Activity: Nov 29 '09, 10:35 AM
Joined: Dec 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • arushibafna-

    Could you give the specific code of your html form you are using or something similar so people can better answer you question?

    For now I can give you this

    If you submit a form you have to set a method. POST, or GET. Also please look at this reference on PHP predefined variables http://www.php.net/manual/en/reserved.variables.php

    Code:
    <form action="submitmarks.php"
    ...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to Find out the Html Tag?
    I have to agree with the previous posts that the code you posted is invalid. All of your input tags contain id attributes with "cv", and ids should be unique. Each variable must be given a unique name as well I think but I don't know the full extent of your project.

    Here is an example using getElementsByNa me
    Code:
    var cvTags   = document.getElementsByName("cv");
    var cvCount = cvTags.length;
    ...
    See more | Go to post
    Last edited by clai83; Nov 29 '09, 10:09 AM. Reason: re-thought answer

    Leave a comment:


  • clai83
    replied to how to create a round checkbox
    Using CSS alone to change the appearance of a checkbox I would say is "difficult" . Since styling of form elements is browser specific there is no way I know of currently to change all checkbox styles across all browsers. There may be browser specific css extensions, however, I have not been able to find any (at least for Firefox). The closest thing I came across was -moz-appearance: radio; however, you don't get the "tick" that...
    See more | Go to post

    Leave a comment:


  • Amzul,

    There are many solutions to your issue, and it really depends on how technical you want to get. I don't have the all the information, but I will make a couple of assumptions.

    1) You want a 2 column layout, a column on the left, and on the right.
    2) You want to keep the width of <div class="line"></div> 400px wide.
    3) You don't want to change your html, only css.

    ...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to Security of PHP Superglobals
    in PHP
    Thanks for the information.

    I will take your advice and use a constant instead.
    See more | Go to post

    Leave a comment:


  • clai83
    started a topic Security of PHP Superglobals
    in PHP

    Security of PHP Superglobals

    Hi everyone,

    I have a question regarding vulnerabilities related to PHP superglobals, in particular $_SERVER.

    I will have a website on a shared hosting environment, and I am unsure of the risks of using the variables such as $_SERVER['DOCUMENT_ROOT'] for things such as "including" files i.e using the include, or require function.

    Are there any know methods to spoof these variables?

    I...
    See more | Go to post

  • clai83
    started a topic Table Rendering Bug OR Messed Up Table?

    Table Rendering Bug OR Messed Up Table?

    Hi All,

    I've made an organisational chart using <table>s, however, I'm having some issues on the rendering of the borders.

    Issues 1: Opera 9.25 I have lines that I don't want appearing pop up and disappear as I scroll up and down

    Issue 2. IE7 I sometimes have the bottom border of the very top box disappear and reappear as I scroll.

    Issue 3. In Box 1 I have 2 lines sticking out to the right...
    See more | Go to post
    Last edited by clai83; Mar 4 '08, 03:49 AM. Reason: Did not show up properly the first time

  • clai83
    replied to PHP Session Resetting on 2nd Page
    in PHP
    Yes HTTP_SESSION_VA RS is deprecated. Same thing though.

    session_registe r() is a deprecated way of registering new session variables. Just use $_SESSION superglobal for all your session needs.

    1. Make sure you allow cookies on your browser when you are testing your script. If the session cookie is not stored properly on your side then the session_start will always bring up a new session.

    2. While you are testing...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to Extract integer from mysql via PHP
    in PHP
    Good idea, Thanks man.

    Now this question has turned into a MYSQL question.

    Is it possible to do some simple data integrity checks using queries? For example checking to see if a particular column has only alphanumeric characters in its data, or something like that....
    See more | Go to post

    Leave a comment:


  • clai83
    replied to PHP Session Resetting on 2nd Page
    in PHP
    ^_^ you do need to session_start() on top of every page. You would think that this would restart a new session, but it doesn't. Basically PHP will do all the background work to see if the user has a cookie (if you are using that method) that has a php session id that matches a session that is currently being stored. If there is a match then all your session variables are stored in the $_SESSION super global

    hopefully this is the an...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to PHP Session Resetting on 2nd Page
    in PHP
    I don't see anything wrong with the code you posted that would affect your $_SESSION['user_id'] variable. I would do the following to check to see if the session is being properly stored.

    1. echo the $_SESSION['user_id'] in the first and second page.
    2. echo the session_id() to make sure that they are the same.
    3. If the session id is not the same then for some reason a new session is being created somewhere.
    ...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to Login - javascript execution
    I have similar code to kerriejones (the javascript part not the PHP).

    [HTML]
    <input
    class="shortInp utField"
    id="username"
    name="username"
    type="text"
    title="<?php echo $html['usertitle']; ?>"
    maxlength="40"
    value="<?php if (isset($clean['username'])) { echo $clean['username'];} else {echo "";}?>"...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to PHP Session Resetting on 2nd Page
    in PHP
    Please post a little bit more code, for example your second page. If the problem isn't your subsequent pages, then it is probably your php.ini settings....
    See more | Go to post

    Leave a comment:


  • clai83
    replied to Login - javascript execution
    I've been creating a login script as well. And actually I finished it in firefox, and it worked fine with safari, and opera, but not IE.

    It would be great if someone were to post the solution to this.

    This particular error also comes up in Zend Studio when doing a debug session.

    IE strikes again -_-
    See more | Go to post

    Leave a comment:


  • clai83
    started a topic Extract integer from mysql via PHP
    in PHP

    Extract integer from mysql via PHP

    mysql and mysqli functions always return strings values, and I understand that I can set the type of the data via the settype function AFTER I extract the data, but is there a way with PHP to extract the data as it is specified in the mysql database? (i.e if the type is an integer then PHP will insert the integer value in the result set).

    The reason I ask is I want to create a function to verify the integrity of the database before I...
    See more | Go to post

  • clai83
    started a topic mbstring settings for English/Japanese Environment
    in PHP

    mbstring settings for English/Japanese Environment

    (A)

    I am making a web application that needs to work in both an English/Japanese environment. This web application is intended to manage a company website (news releases, add new companies), and also contains an admin section available to administrators only. During my coding process I did not realize the existence of the mbstring functions since I am still fairly new to PHP. I am attempting to change the mbstring settings in the php.ini...
    See more | Go to post

  • clai83
    replied to Passing secure data with $_SESSION
    in PHP
    SHA1 is a hashing algorithm. There are know vulnerabilities now for this algorithm, but I believe that it takes a lot of processing power. Though vulnerabilities are know, these I believe are related to finding collisions and not actual decryption. People are being recommended to go with the SHA2 variants now. You can read about SHA algorithms on wikipedia. There is some pseudo-code for you to look at. If you are looking to decrypt a key then SHA1...
    See more | Go to post

    Leave a comment:


  • Well think about it. If you refresh the page what will happen? There is no post data or data to enter into the database, so nothing will happen. The only way a person can submit data is by pressing the submit button. Why don't you try it first.

    Also if you are worried about empty entries or invalid entries in your database then you HAVE TO validate your data as I explained in the very first example.

    Making PHP do what you...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to PHP Access Database Auto Number Issue
    in PHP
    Did you try the SQL statement without the single quotes?...
    See more | Go to post

    Leave a comment:


  • clai83
    replied to populating dropdown list with column names?
    in PHP
    You basically have to find out this information by sending a query to the database

    SELECT payment FROM table WHERE payment = 'no' AND day = 1

    then you test how many rows you got in your mysql result with the mysql_num_rows function. If it is equal to 1 then you have a match and you know that you show display it. If it is 0 then you shouldn't display it.

    something like that...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...