Jump to content

kbh43dz_u

Members
  • Posts

    96
  • Joined

  • Last visited

Posts posted by kbh43dz_u

  1. Hello!

    I need PHP6 (snapshot) installed for a project and it is just not working >.> Did anyone try to install it? I used 4 tutorials but I couldn't figure out how to get it working. I already managed to have it compiled completely but then the mudule-files (.so) were missing and I couldn't integrate it.... there must have been a lot wrong with my way to install it.

     

    Does anyone know more about, or have other tutorials.... or maybe someone could tell me how he installed it....

     

     

    best regards!

     

     

    (used tutorials:

    http://blog.agoraproduction.com/index.php?/archives/19-Installing-PHP6-For-beginners.html

    http://www.v-nessa.net/2007/02/26/how-to-install-php6

    http://www.bencornwell.com/2007/11/18/php-6-installation-guide-for-ubuntu-710-gutsy-gibbon/

    http://www.journaldunet.com/developpeur/tutoriel/php/071106-php6-apache-ubuntu.shtml

    )

  2. Try

    ALTER TABLE tablename AUTO_INCREMENT = 1

    It should set auto increment to the number of your last entry + 1. (Setting it to 0 when you have entries will not work ;) )

    I hope I could help you.

     

     

    edit: if you want to add an entry with an auto increment number which you deleted before you can use:

    SET insert_id = 8;
    INSERT INTO tablename VALUES (’field1’, '…');

    (for example if you have entries from 0 to 10 but deleted entry number 8 )

  3. Hello, I am new to javascript and tried modifying an existing script but it doesn't work.  It is used to see if one option on a form is selected, and the other form field is empty, it will error.  Here is what I modified:

     

    <script language="JavaScript" type="text/javascript">
    				<!--
    				function check_music()
    				{
    					if (form.music_fan.value == 1 && form.musician_name.value == "") 
    					{
    						alert( "test." );
    						form.music_fan.focus();
    						return false ;
    					}
    
    					return true ;
    				}
    				//-->
    				</script>

     

    and on the first <form I added:

     

    onSubmit="return checkme_signup()"

     

    There are no errors but it just continues to the next page.  I used the php && so perhaps javascript uses something else for "and" or something.  Basically I only want it to alert when the music_fan value is = 1 and the musician_name is empty.  If the music_fan value is 0 or the musician_name is not empty it will not error.  Thanks!

     

     

     

     

    ..>

    Your script (check music() should look like that:

    <script language="JavaScript" type="text/javascript">
    <!--
    function check_music()
    {
    	if (document.getElementById('music_fan').checked && document.getElementById('musician_name').value == "") 
    	{
    		alert( "error - but my script works." );
    		document.getElementById('musician_name').focus();
    		return false;
    	}
    	return true;
    }
    //-->
    </script>
    

    The Value of "Music_fan" is ALWAYS == 1 because you never change the value of it - you just select it or not (this is why it always alerts you). also if you select the other checkbox, the value of checkbox one doesn't change. You want to use ".checked" ... ask if it is checked. (you don't need the values of the checkboxes in your script.)

     

    In my example I'm calling the fields with "document.getElementById('musician_name')" so you will have tho add ID's for your fields - it's better because than your calls are unique.

     

    (I added id="music_fan" to checkbox 1; id="music_fan2" to checkbox 2 and id="musician_name" to the musician_name-field. If you also want to check for a selection in the drop-down field you have to extend this script)

  4. simply use

    echo $myVar[0];
    

     

    you can access every letter from a string like an array.

     

     

     

    edit:

    if you still need it in an array:

    for ($i = 0; $i < strlen($myVar); $i++){
          $array[] = $myVar[$i];
    }
    

    or

    for ($i = 0; $i < strlen($myVar); $i++){
          $array[] = substr ($myVar, $i, 1);
    }
    

     

  5. this would make it harder but not impossible (just try - no security by obscurity) ... better you check if the user is allowed to view the message: your users probably have to login. than you have their user id's or names saved in a session. check if the user i allowed to view it - but by an id transported by the URL (take something a user cant manipulate).

  6. Why not add in a box at the end that they write y or n for if the information is correct and when that is filled in it automatically is triggered

     

     

    why no button "send" or "next" ;)

     

    ->

    is there a way if both values are good to automaticy post to the next page instead of making a button ?

  7. function openWin(width, height, scroll){ //scroll = yes/no
        win = window.open("test.php?action=view_users", "Window", "width="+width+",height="+height+",scrollbars="+scroll);
    }
    

     

     

    <a href="terms.php" onclick="openWin("600", "400", "yes");return false">Terms</a

     

    (are you sure you don't want the url for the popup to be dynamic? in the "new" function you posted it will not be given to the function by your link)

  8. thank you im a little scared though cause i know nothing about java and have only been learning php for a couple of months in my spare time.

    Never ever call javscript "java"! completely different thing ;)

     

    No you cant't submit a form with PHP (PHP runs on the server) but with javascript.

     

    The way ILYAS415 told you will work! but you probably don't want the form to be submitted right after you loaded the page, so you'll have to tell the function "submit()" WHEN you want to submit, like:

    <script lanugage='javascript'>
    function checkForm(){
        if(...){
            document.form1.submit();
        }
    }
    
    window.setInterval(checkForm_ress,100); //check if form has to submit again and again.
    </script>
    

    instead of

    <script lanugage='javascript'>document.form1.submit();</script>
    

     

    But your problem will be: How do you know if your user has finished his input?  ;D (because if it is a search-form you don't know what he enters). (this is why I couldn't fill the "if clause" in my example)

×
×
  • 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.