Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. $_POST['model'] $_POST['qty'] But as stated above you have no visible code to do anything with the data.
  2. CSS is definitely the way to go. As for resources, webmonkey.com is a good one and any book centered around CSS Tables or google search for CSS Tables would be helpful to him.
  3. Can't be done as it is a field in the form. You best bet is if possible, not even use GET but use POST instead which hides the whole query string from the url so it would look like this: http://localhost/mobile/update.php Other than that if it is on the form, it will be passed in the query string.
  4. Tables would be the easiest solution: <?php //Database connection above (assume you know how to do that) $query = mysql_query("SELECT * FROM table_name ORDER BY datestamp") or die(mysql_error() . " <--- Error!"); echo '<table><tr><td>Time</td><td>Description</td><td>Order</td></tr>'; while ($row = mysql_fetch_array($query)) { echo '<tr>'; echo '<td>' . $row['datestamp'] . '</td>'; echo '<td>' . $row['description'] . '</td>'; echo '<td>' . $row['ordernum'] . '</td>'; echo '</tr>'; } echo '</table>'; ?> Basic gist of it. Googling can find you much more intuitive already done data grid type scripts.
  5. Store a variable in session that you only set on pages from your site and check that. Other than that it is hard to do as someone can easily spoof what page they are coming from and can access it/submit it like it is coming from your domain.
  6. Given that you have a login page with code make them link to the login page: login.php?action=validate&code=234dsf342rt345twf&email=jack@son.com Give that you check the code you pull out the user information for the email and check the code against the DB one. If it is good then update the column activated to be one...
  7. if ($_SESSION['isadmin'] != 1) Too many ) parenthesis.
  8. http://www.phpfreaks.com/forums/index.php/topic,168659.0.html http://www.phpfreaks.com/forums/index.php?action=search2 Search the forums for : SQL Injection Prevent This topic has been covered numerous times, and answered numerous times.
  9. http://en.wikipedia.org/wiki/405_error 405 Method Not Allowed A request was made to a URL using a request method not supported by that URL; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource
  10. http://www.ragepank.com/articles/26/disable-phpsessid/ If you are shooting for SEO friendly you are shooting yourself in the foot. (Note the above listing was found using the following Google URL: http://www.google.com/search?hl=en&q=remove+PHPSESSID+from+the+url&btnG=Google+Search )
  11. Make sure display_errors is turned on and error_reporting is set to E_ALL to make sure that errors are suppose to display. Also, you are not checking if get_include_contents is returning false, which it could be. A lot of unknowns I suggest trying that first.
  12. Your looking in the wrong spot. What really matters is how you pulled $music out of the database. It seems as though it is carried along with the viewing user and used that way instead of it being assigned to the current profile that is being viewed. Find where the data is being pulled out and store the user's profile who is being viewed music information in $music and it should work.
  13. www.php.net/session You want to use session's which will essentially hide the "Errors" Another alternative is to you AJAX and never really "Refresh" the page and just have the error check done on its own. Either way should give you your desired result.
  14. Could it be that you define $max after you ran your query?
  15. What he is trying to say, no where in that code is $array defined before the if statement it is used in. Which is why there is an error. If there is more code you are omitting, please post it. Otherwise where are you getting the values of $array from?
  16. Are you using relative or absolute paths for the css inside the HTML? Use absolute or even add <base href="http://www.somesite.com/directoryA/style.css"> Especially for headers this is important as different locations of the php files will throw it off, especially if the php file is being included.
  17. premiso

    Update

    Use javascript to detect the pop-up window close or add an event to the window close button that triggers an event on the main page to tell the page to retrieve the information from the remote script for an update and display it in the div....unless I am missing something that is about all you would need to do.
  18. An easier solution is using the mysql TO_DATE function (google it) and pull it out how you want it, or www.php.net/strtotime which converts most dates into a unix time stamp to avoid the nasty ness of mktime() and explode function. <?php function formatDate($val) { return date ('d M Y', strtotime($val)); } ?> Adds a bit more efficiency I guess, either way should work.
  19. premiso

    Update

    As stated above, ajax.
  20. www.php.net/foreach <?php foreach ($myArray as $val) { echo $val; } ?>
  21. I would highly suggest finding a free mass emailing script out there, as mass emailing is tough to do and since it has already been done, no real need to re-invent the wheel. Thats just my 2cents, and MySQL database is the way to go.
  22. Eclipse is most likely your best bet. It works great for me and I only use it for my projects. Just writing nonsense code I just use any type of editor depending on Gnome or KDE with syntax highlighting. Definitely eclipse.
  23. It very well could be. I would contact them, especially of they are a shared hosting and ask. Other than that another option is to do a javascript re-direct instead: echo '<script type="text/javascript">window.location="http://www.server.com/admin_login.php";</script>'; As I said, not preferred but it should work, with or without output before the statement.
  24. Edit: My bad recursion is not needed here. function fnGetTotals($arrData) { $arrValues_list = array(); foreach ($arrData[0]['child'] as $strKey =>$arrValues) { if ($arrValues['name']=='PLAYER') { $arrValues_list[]['attrs'] = $arrValues['attrs']; } } return $arrValues_list; } Unsure if it works, but I think that is what you are looking for.
  25. It doesn't, that is an index of an array. Indexes of an array can contain values much like a variable. A multi-dimensional array, which this does not seem to be, is where an index of an array will contain another array. Hope that makes sense.
×
×
  • 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.