-
Posts
279 -
Joined
-
Last visited
Never
Posts posted by vicodin
-
-
This should do it....
$query = "SELECT * FROM mp3 WHERE id = '$song_id'";
-
Or setup like a virtual server for development and have it on E_ALL... Thats what i did cause i got sick of searching for errors
-
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'];
-
Well php is telling you its not. PHP has no idea what that function is. Maybe a dll is not active or double check your exact version and if it has it.
-
my smtp server... it just comes with a basic stamp from my smtp server... i want it to say what im typing in the $from
-
The From: is not working. Any idea anyone?
$from = "Blah@Blah.com"; $headers = "From: {$from}\r\n"; mail($to,$subject,$message,$headers);
-
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.
-
-
Ohh i see it... Thanks!!!
-
Its using that count() so it should just count the number of arrays in it and thats it.
-
I need that though because i have them numbered in my db and it gets ordered by them
-
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!
-
Thank you very much for the help!
-
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?
-
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?
-
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>';
-
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!
-
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
-
You have backup files? If you do try backing it up
-
Possible bad entry in your db? Look over your db and check the info in there to make sure its not outputting anything that would mess the php code up.
-
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
-
Thank you guys!
-
mysql_select_db("Your DataBase") or die(mysql_error());
mysql_query("UPDATE $YourTable SET $YourColumn = '$New-Thing-Your-Putting-In-To-The-DB'
WHERE id = '$where'") or die (mysql_error());
-
Hey guys i am drawing a blank right now how would i cut the rest of the text off in a string at lets say the 200th character?
My form is broken. Please help
in PHP Coding Help
Posted
ya you gotta give it some kind of action.