Jump to content

vicodin

Members
  • Posts

    279
  • Joined

  • Last visited

    Never

Posts posted by vicodin

  1. check your HTML if you put the </form> in the wrong spot it can screw it up visually and where you have:

     

    $clientCustomersID = $_SESSION['customer_id']);

     

     

    it has a ) in it with no starting bracket and i dont think it is saposed to be there so make it:

     

    $clientCustomersID = $_SESSION['customer_id'];

     

     

  2. If you get no errors (make sure you have E_ALL as your error setting) then as far as php is concerned it was sent. The other areas which could be your issue is your SMTP server, ISP, and getting caught in spam filters... Im sure theres more indepth issues that could happen but check all those first.

  3. I just wrote this and when it tries to execute it just times out... Any ideas why?

    This is my form:

     

    <form action ="eupdate.php" method ="post" name="updateevents">
    <table width="auto" cellpadding="2" cellspacing="2" border="0" id="startevents">
    <tr>
    <td class="eventtop">Pos.</td>
    <td class="eventtop">Event Name</td>
    <td class="eventtop">Event Link</td>
    <td class="eventtop">Event Date</td>
    </tr>
    <tr>
    <td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
    <td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
    <td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
    <td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
    </tr>
    <tr>
    <td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
    <td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
    <td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
    <td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
    </tr>
    <tr>
    <td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
    <td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
    <td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
    <td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
    </tr>
    <tr>
    <td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
    <td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
    <td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
    <td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
    </tr>
    <tr>
    <td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
    <td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
    <td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
    <td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
    </tr>
    
    </table>
    </form>
    

     

    This is my script:

     

    mysql_select_db("Mydb") or die(mysql_error());
    
    for ($i = 0; $i = count($_POST['enum']); $i++) // Line 13
    {  			
    mysql_query("UPDATE events SET date = '{$_POST[edate][$i]}', event = '{$_POST[event][$i]}', link ='{$_POST[elink][$i]}',num = '{$_POST[enum][$i]} ' WHERE id = '$i'") or die (mysql_error());
    																					}
                  echo 'Events Have Been Updated. Check Front Page to make sure it looks ok.... To go back to editing page <a href=" panel3.php">Click Here</a>';
    
    

     

    It errors out to:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/mediapil/public_html/admin/eupdate.php on line 13
    

     

    Thank you!

  4. Im pretty sure i get what your getting at... In the form i have for the name (input type ="text" name ="link[]") would i on the next page have $_POST['link[]'] or $_POST['link'][] to get it?

     

  5. I have this echoing 5 times so there is 5 rows of it.

    echo "<tr>";
    echo '<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>';
    echo '<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>';
    echo "</tr>";
    echo "<tr>";
    echo '<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>';
    echo '<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>';
    echo "</tr>";
    echo "<tr>";
    echo '<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>';
    echo '<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>';
    echo "</tr>";
    echo "<tr>";
    echo '<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>';
    echo '<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>';
    echo "</tr>";
    echo "<tr>";
    echo '<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>';
    echo '<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>';
    echo '<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>';
    echo "</tr>";
    

     

    That brings up another question... i dont even know if that will post as an array will it?

     

  6. Or if your looking for something specific you can do something like this.

    mysql_select_db("Your DB") or die(mysql_error());
    $query = "SELECT * FROM YourTable WHERE WhatEver ="TheThingYourLookingFor";		
    $result = mysql_query($query) or die(mysql_error());
    $row = mysql_fetch_array($result);
    echo '<a href='.$row['Your Link'].' ">.'$row['HowYouWantToDescribeIt'].'</a>';
    

  7. Ok i need to update 5 things in mysql all at the same time. The table is in this format:

    ------------------------ 
    ID | Event | Link | Date |
    ------------------------
    1 |    x    |   x   |   x    |
    2 |    x    |   x   |   x    |
    3 |    x    |   x   |   x    |
    4 |    x    |   x   |   x    |
    5 |    x    |   x   |   x    |
    -------------------------
    

    I have 5 in dividual input boxes they can submit, and they are all being inputted into an array so i have $event[] , $link[] , $date[].

    I cant figure out how to take the arrays and have them update the db... Any help would be greatly appreciated...Thanks!

  8. Its not getting an error. It accepts my password then redirects me to another page because thats what its saposed to do.... so the sessions are going to /var/lib/php5 and the permissions are

     

    drwxr-xr-x 2 root root     4096 2008-07-30 23:09 php5

     

    Is that ok?

     

    This is my info file.

     

    session.auto_start			Off	Off
    session.bug_compat_42		On	On
    session.bug_compat_warn		On	On
    session.cache_expire		180	180
    session.cache_limiter		nocache	nocache
    session.cookie_domain		no value	no value
    session.cookie_httponly		Off	Off
    session.cookie_lifetime		0	0
    session.cookie_path		/	/
    session.cookie_secure		Off	Off
    session.entropy_file		no value	no value
    session.entropy_length		0	0
    session.gc_divisor			100	100
    session.gc_maxlifetime		1440	1440
    session.gc_probability		0	0
    session.hash_bits_per_character		4	4
    session.hash_function		0	0
    session.name			PHPSESSID	PHPSESSID
    session.referer_check		no value	no value
    session.save_handler		files	files
    session.save_path		/var/lib/php5	/var/lib/php5
    session.serialize_handler		php	php
    session.use_cookies		On	On
    session.use_only_cookies		Off	Off
    session.use_trans_sid		0	0
    

  9. Hello all... I just made my own server at home and uploaded my site to do some dev work so i dont need to upload it everytime i want to test it. So i downloaded ubuntu server and install lamp and all that good stuff. Now when i log in its not keeping a session. I have a script where it checks if the session isset and if it isnt it redirects somewhere else( it does work on my production server. Everytime i get redirected. Im not sure if php is messing up or its the apache server. Any help would be greatly appreciated... Thank you

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