Jump to content

Dathremar

Members
  • Posts

    169
  • Joined

  • Last visited

Posts posted by Dathremar

  1. get rid of the <div id="wrapper"> on the top of the page.

     

    As i noticed u have another <div id="wrapper"> in the HTML little down in the script. I really don't understand the need of the 1st div.

     

    And if this page is wrapped in another one, then put that div in the wrapping page.

  2. this is how u make object of that class:

     

    // connection to database

    class name_of_object extends DB_Sql {

      var $classname = "name";

      var $Host    = "host";

      var $Database = "database_name";

      var $User = "user_name";

      var $Password = "password";

     

      function haltmsg($msg) {

      echo "Database error:\\t".$msg."\\nPHP reported:\\t".$this->Error;

      exit;

      }

    }

     

    After this use:

     

    $name_of_instance_of_object = new name_of_object;

     

    and after this use :

     

    $name_of_instance_of_object->query($query_string); -> for executing queries

    $name_of_instance_of_object->next_record(); -> for geting the next record :D

    $name_of_instance_of_object->nr(); -> number of rows for the result of the execution of the query.

     

    These are most common used i guess. If u need more  hlp just post here.

  3. I agree with You on that, but the thing is that this is massive application and asking me to implement "only" on the part where is the data exchange is made.

     

    So I am trying to evaluate if I should ask for more time and adopt whole application on https or is there a way I can only make that part (which is included in an iframe) with https.

     

     

  4. Just wanted to hear you opinion if this is doable or not?

     

    I have an web application which consists of iframes. My problem is that i want 1 of the iframes to be made with https (some data sending is made from here). But here i get the problem of restricted cross domain scripting.

     

    So my question is : Is there a chance to make only one part of the application on https and the other part to stay on http, or I need to make the necessary changes to the whole application to be transferred to https?

     

    P.S. After reading this text, I see it somehow confusing even to myself (:?) , but post a question and i will try to clarify it :)

  5. I know that this is supposed to be easy but i have a problem here. I am trying to pass a message to a php file where i can insert it into a DB. So everything works fine until some1 types in the text box a character '+' or a '&' char. I know that the problem is that these 2 are characters that are messing up the java script. The & messes up the URl and the + is the concat sign for javascript.

     

    So any idea how to escape them and still send them through ajax?

     

     

  6. Check the included file if it outputs something on the page, also this problem is known as empty spaces problem so try to delete any empty space at beginning and at the end of the document. Also I had problem like this (was working in Dreamweaver) and it didnt display any empty spaces. I opened the same document in Notepad and did some deleting on the beginning and end of the page and suddenly the error was gone.

     

    My guess is that some editors have some kind of special chars that are not displayed.

     

    Hope it helps

  7. The problem is a regular sql query is not working:

     

    something like :

    
    $db_response = new db_ticket;// have included mysql class for connection to DB and stuff
    
    if ($_GET['sp'] <> '')
    {
    $sport_id = $_GET['sp']; 
    $string = "CALL liga_menu_list('$sport_id')";
    $db_response->query($string);
    if ($db_response->nr() > 0)
    {
    ?>
    	<option value="">Izberi liga</option>
    <?
    	while ($db_response->next_record())
    	{
    ?>
    		<option value="<?=$db_response->row('liga_id')?>"><?=$db_response->row('opis')?></option>
    <?
    	}
    }
    }

     

    So when i execute this i get error from the Mysql : "#1312 - PROCEDURE csbets0_klad29.liga_menu_list can't return a result set in the given context";

     

    When I tried to google this i got to this MySqli thingy which I dont know how to use. So thats my question.

     

    Thx

     

  8. Ok I am into something new (for myself) and unfamiliar. Something i thought that will be like walk in the park suddenly became hard as u can get.

    I need to make a web display of some database information which i can retrieve by calling mysql stored procedures. But i get errors when i try to call em like a normal sql querry. Searched the web and came by a php class called mysqli. Can some1 plz give me simple guidelines (tried googling and getting alot of info i really cant understand) on how to make a call to a stored procedure and display the resault.

     

    Thx in advance for any kind of info

  9. Well, dunno if i got this right ... but you can prefetch all the info of the tables on page load and put them into a javascript arrays. So when the user select something from 1 drop down menu, with a javascript event look for the resaults in the array which u already have declared on the page load. If u think that this is something u can use tell me i will post more.

     

    cheer

  10. Yeah that's true. But the same variable here it is used for the link to the file and for the file name so if i change that then the link will not work. Imo it is stupid to upload files without changing their name or at least adopt them for further usage, but i am not the creator of this program :( So I can't change that.

    About the blank spaces. Strange thing is that only the last blank space is making a problem. If i remove only the last one then the name is valid.

    Thats why I wanted some1 to explain the filter to me in more details.

     

    ie. This part a-zA-Z0-9 i know it means it can include a-z and A-Z letters number 0-9,but i dont understand _\.\-])+(( and \-])+\.)+( in between this info.

     

     

  11. Hello, I really can't figure out this (cuz I am really not good with javascript) :

    function valid_web(web)

    {

    var filter  = /([a-zA-Z0-9_\.\-])+(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

    uslov = ((web.substr(0,4) == "www.") || (web.substr(0,7) == "http://"));

    return (uslov && filter.test(web));

    }

    This is function for validatin if it is a web/link ok i get that, but when i input a name like this one : http://path/to/file/Upatstvo voip mk v1 5.doc - it returns false. If I just delete the last blank spot between the 1 and 5 it returns true. Because this doesn't make any sense to me, could be some1 kind enough and knows java script to explain to me whats happening in the function. Or at least explain the filter variable (thats what i dont understand meaning what all those signs mean, which of them are the filter and which are the concatenation or something marks).

    Thx

  12. I have a problem which i narrowed it down to two things:

    It is either a too large array to make (atm breaks when i try to array_push more the 9093 record) or the problem is when i try to write this variable into session.

     

    So I would like to ask you is there some kind of a max allowed size of array (variable) in php or session variable size?

     

    Post if i am not clear enough.

    Thx

  13. Just add that condition if "A" <> "B" before the printing of the option. So if they are <> from each other it will print if not then it won't.

     

    Hope I understand what you want to do :)

     

    Post if u need something different

  14. I wanted to ask you if there you have any idea of doing the following:

     

    I need to make something like a screen shot or thumbnail of a web page. But I need the page in full size meaning if there are scrolls i need the bottom of it too.

     

    I already found some scripts and solutions, but they were based on some resolution so if the website is bigger than that I wont get the whole thing.

     

    Thx in advance.

  15. I am using this function for checking a valid username:

     

    function Valid_username($username)

    {   

        if (ereg('^[a-zA-Z0-9]+$', $username))

              return true;

        else

              return false;  

    }

     

    and it does take into consideration the # character. Try it out.

  16. You can't mix upload and insertion into db. I mean, I dont see that you have prevented the insert into database part of your code if the upload failed.

    I have come across similar problems. Usually it was a problem with access rights. Check what access rights you have for the folders where you wanna upload the files.

    And 2nd thing is to double check the path to the files.

     

    Hope I helped you in any way.

  17. Well try this too:

     

    $link_update ="path_to_the_page";

    echo "<script language=\"javascript\">";

    echo "location.href = \"$link_update\"";

    echo "</script>";

    exit();

     

    It is the same thing actually, but give it a try :)

     

    P.S. and yeah if 1 of the queries fives you an error then the code won't work.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.