• Member Avatar for minitauros
    minitauros

    Replied To a Post in Session

    You start a session with session_start(). That should probably be one of the first lines, if not the first line, of any of your files in which you want to …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Need help with trying to create thumbnails with php

    The imagejpeg() function tries to create a JPEG file in the given directory. If the permissions for that directory are set so that an image cannot be created in it, …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Order by relevance using boolean fulltext search + rand() for rest columns

    I'm not sure but maybe the RAND() should be something your select returns. Just a piece of thought, though. Something like SELECT RAND() AS rand_nr ORDER BY rand_nr DESC Just …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Linking div and img tag in one div tag

    Of course you are encouraged to create such a slideshow yourself, because it's a nice opportunity and a very good way to practice your programming. However, there are thousands of …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in How to capture option value and echo out or concatenate to include file?

    Well it seems like this should be working. Only thing that I see is wrong (in case you haven't found it yet yourself) is the misplacement of your semicolon on …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Mysql query to filter product by categoey

    PS: A link table is an extra table that stores which products are connected to which categories. E.g.: Table categories_products category_id | product_id 1 | 5 1 | 6 1 …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Margin-bottom not working

    Not sure but I think it's not recommended you place HTML elements outside your <body> tags (which is what your CSS is doing with the black bar).
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in How to get the value of the selected dropdown list in php

    Are you asking how you can use the item that the user selects in your <select> to fill another <select> element?
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Can I use AJAX to update contents on the same page getting data from DB

    Yes you can :). Do you have any experience in using AJAX? If not, this might be a nice tutorial to start: http://www.w3schools.com/jquery/jquery_ajax_intro.asp
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Function to show login/logout

    In line 2, you are comparing `session` to `null`. However, firstly, there is an error in your code here, as "session" is no PHP language. It should either be $session …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Problem Compatibility of ajax in Mozilla

    In your Javascript console, do you get a confirmation of your AJAX request being executed?
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Problem Compatibility of ajax in Mozilla

    In your Javascript console, do you get a confirmation of your AJAX request being executed? If not, apparently something isn't working right. Could you post the lines of your script …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Problem Compatibility of ajax in Mozilla

    Have you checked your developer console for possible errors? Usually it shows information about what's going wrong - if something is going wrong.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Regex nested tags

    If you are still looking for a regex, something like this might work: `/\[url\](?!\[url\])(.*?)\[\/url\]/is` It returns only [url] tags that are not followed by another [url] tag.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Cant Insert data with text more than 3 paragraph

    You could use `mysql_real_escape_string()` to escape all necessary characters within stuff you insert, I guess. E.g. INSERT ... VALUES (mysql_real_escape_string($your_value), mysql_real_escape_string($your_value_2)) etc.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Cant Insert data with text more than 3 paragraph

    Maybe the varchar (225) kicks in here. Does the article that you are submitting not exceed the field's maximum storage size (225)?
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Time Taken for each row to be inserted to MySQL database

    What pritaeas says is (well, what else would you expect) right. To track progress, you'd have to separately select and insert those rows, which would - in this case - …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Use of Session variable

    Ok so let's clear this up a little bit. You have a page called index.php. It retrieves data from your database. Now *which ID* do you want to use on …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Print variable from Mysql DB

    You could do it in the loop that fetches your DB records. E.g. <?php while(...) { $website = $record['website']; $website = str_replace('$site', $site, $website); }
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Use of Session variable

    Index page: <?php session_start(); echo '<p>Your session id is: ' . session_id() . '</p>'; Other page: <?php session_start(); echo '<p>Your session id is: ' . session_id() . '</p>'; See if …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in server side validation php

    That is weird, because if the form gets submitted, it is reloaded and $_POST vars should have been filled with the post data. Could you try to place a `print_r($_POST);` …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in server side validation php

    Could you try and replace your HTML part with the following? <?php error_reporting(E_ALL ^ E_NOTICE); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;" charset="iso-8859-1;"> <link rel="stylesheet" type="text/css" href="css/style.css" media="screen"> </head> …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in server side validation php

    That's because your error reporting is set to also show notices. $_POST['name'] has not yet been set when you first load the page, thus you get the notice. You can …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in server side validation php

    I think you should maybe use `<?= $_POST['name']; ?>` instead of just `<?= $name; ?>`, as the `$name` variable hasn't been set yet when PHP arrives at the <form> part.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in hide a div from 9PM to 9AM using php/jquery

    Teamwork :p
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Incrementing width using .css() method.

    Hm I don't know about using it in that way, actually, just thought I'd help you out with something of which I know for certain that it works. Are you …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in hide a div from 9PM to 9AM using php/jquery

    Woops, my bad :). Should be && indeed. Don't see why the comparison should be reversed, though.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Incrementing width using .css() method.

    For as far as I know, the css() function only accepts two parameters, being index and value. E.g. you would execute `css('width', 420)`. I'm not completely sure though, but I …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Creating your own search bar

    Move the `name` parameter to the input with `type="text"`, then it should probably work! <input type="text" name="q"id="searchtxt" /> <input type="submit" id="searchbtn"/>
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in hide a div from 9PM to 9AM using php/jquery

    What about: <?php if(date('H') > 9 || date('H') < 21) { // Show div. }
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in this

    An example, with you class A (just try to execute it, might clear things up a bit more for you): <?php class A { private $private_attribute = 'this is a …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in execute queries with condition

    What's going wrong? :)
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Count the number of post from database

    What about modifying your query just a little bit, to: `SELECT * FROM dbAdd WHERE add_city = '" . mysql_real_escape_string($wil) . "' ORDER BY add_city DESC LIMIT 200`
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in how to set a background image as width:100%

    Have you tried what has been posted [here](http://stackoverflow.com/questions/376253/stretch-and-scale-css-background) (StackOverflow)?
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Count the number of post from database

    Your query seems to be incorrect. You should probably not use `WHERE $add_city` but `WHERE add_city` (without the $). Besides that, a COUNT() query might be more efficient here. E.g.: …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Php code not working on IE,chrome

    First of all I think the use of the <marquee> element is waaaay overaged. Second, I think you could solve this problem by adding a CSS style to your <ul>'s …
  • Member Avatar for minitauros
    minitauros

    Created Security: hashing/encrypting URL data?

    Just curious about your thoughts on this subject. **Example:** www.site.com/?id=1 or www.site.com/?id=8adyfa8df614812yasdf (which is also "1", but encrypted) What would you recommend? What do you use? Anyone with pros and/or …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in help in query

    Well, if you need only one record from the *tblStudents* table, and multiple records from the *tblGrades* table, I suggest you just perform two queries. The first query will retreive …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Internet explorer 8 stops nav from working

    Nope I did not know about that, thank you for the info :). Another solution for this problem hasn't crossed my mind yet, though, unfortunately. Pretty weird that it isn't …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in Internet explorer 8 stops nav from working

    I'm not sure but the first thing that comes to my mind is that IE8 is not ready to interpret HTML5 tags like <nav>. Maybe you could find out more …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    You're welcome :). Glad you got it to work.
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    `UPDATE saudi_journal SET AU ='' WHERE RID = '3'` This query sets AU to null (removes its value). You should make sure $AU has a value in your script (so …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Well, have you checked if the variables you are using in your query actually have a value? Does echo-ing your query show anything particular? E.g. what does `echo $query;` say? …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Well I guess then you'd have to assign the URL you want to add to a record to a variable, like `$url = 'your_url'`, and then update your database, for …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Well, it could be because you're not actually specifying a value to update your record with. You could try this to see if an error is generated. If not, I …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Woops, my bad :). The first `if()` statement is not doing a proper check. It should be if(!$_POST['form_name'])
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in fetch result & export to csv file

    I guess you should check out the [fputcsv()](http://www.php.net/fputcsv) function :).
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Could you replace the last `elseif()` construction by the following? elseif($_POST['form_name'] == 'update') { //* The update form has been submitted. Update the database. // Let's see if we actually …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Oh I see there is still a `if (isset($_POST['submit']))` line in the second `elseif()` statement. You could remove that - the `if()` statement that comes a couple of lines earlier …
  • Member Avatar for minitauros
    minitauros

    Replied To a Post in retreive and updating mysql database

    Please read my post carefully again, as I think you might benefit from it in the future. If you have questions about it, feel free to ask! Here's an example …

The End.