Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. Hey folks, is there some particular reason not able to use / bind ipv6 address as pasrt of a default interface and address in mysql? For examle, no such thing as a problem when using a loopback ipv6 addr: /etc/my.cnf bind-address=::1 // works fine // but bind-address=fe80::216:3eff:fe97:9f35 // failed eth0 Link encap:Ethernet HWaddr 00:16:3E:97:9F:35 inet addr:192.168.122.2 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe97:9f35/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:897358 errors:0 dropped:0 overruns:0 frame:0 TX packets:166433 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:84292777 (80.3 MiB) TX bytes:177566584 (169.3 MiB)
  2. Any chance to use non-ascii characters as a name of the name html atribute? for instance, none of these values are being submitted to the server using the following html form: <?php session_start(); error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); if (isset($_POST["somethingelse"])) { echo '<pre>' , print_r($_POST,true) , '</pre>'; } else { ?> <form method="post"> <input type="hidden" namе="nickname" value="Rob"> <input type="checkbox" namе="somethingelse[0]" value="0"> 0<br> <input type="checkbox" name="somethingelsе[1]" value="1"> 1<br> <input type="checkbox" namе="somethingelse[2]" value="2"> 2 <br><br> <input type="submit"></form> <?php } ?> To check the error and access log messages you need to go to /var/log directory and find service's name directory, it would be named apache or httpd (not sure in SUSE). Inside this folder you will find apache log files. Submit the form again and give us the output messages of : tail access_log // and tail error_log
  3. Rob, any chance to see the last records of apache error and success files, when the form is being submitted?
  4. Much, much better than your script to build the query in php, something like: <?php function getJob($p) { switch ($p) { case 'news': $txt = 'news'; break; case 'jobs': $txt = 'jobs'; break; case 'region': $txt = 'region'; break; default: $txt = 'default'; break; } return $txt; } $sql = "SELECT * FROM `jobs` WHERE `title` LIKE '%" . getJob('news') . "%' LIMIT 1 10"; echo $sql;
  5. Go back to your first posting code: <?php session_start(); $sql = $mysqli->query("SELECT user_level FROM imobiliare_users WHERE id=$id"); $user_level = $mysqli->query($sql); echo $user_level; if ($user_level !="administrator") { echo "You are not the proper user type to view this page"; die(); } Have you tried to foreach the values for every row, before using some if / else statement block?
  6. Have you tried to add now() to the selecting list of the original_table. Something like: INSERT INTO archive_table(col_1, col_2, col_3) SELECT col_1,col_2, now() FROM original_table WHERE id = 1
  7. any suggestions for the old windows versions - 98 and 95?
  8. Try, if(isset($errorString)) { echo '<p class="error">'.$errorString.'</p>'; } else if(isset($messageString)) { echo '<p class="success">'.$messageString.'</p>'; }
  9. There are 4 possible ways in php, that I know to achieve this. 1.Using a standart html form with POST / GET / PUT / DELETE methods ( obviously you don't like it) 2.Using sessions / cookies as Frank_b already mentioned. 3.Using an url between pages. 4. Using stdin / stdout I/O redirection
  10. Why? You can't install it / them or cannot run it / them? Every machine / server running with linux copy would be great, I am with centos and redhat.
  11. Is "sanitize" an internal ( built-in) function in php?
  12. One of the best reply written by you, .josh
  13. I am glad to see that you got it sorted out. How about to share the solution helping someone with the same issue?
  14. when you make a request to the page every time you get dynamically the value and name of those 2 input fields: <input type="hidden" value="aW5kZXgucGhwP0l0ZW1pZD0yMTY=" name="return"> <input type="hidden" value="1" name="1555e5a1f4e76fd4029da142aee42022"> then your login credential would be similar like : username=jazz&password=password&Submit=Conectare&option=com_users&task=user.login&return=aW5kZXgucGhwP0l0ZW1pZD0yMTY%3D&1555e5a1f4e76fd4029da142aee42022=1 in case like this that you don't know which exactly return:value/name would be attached to the login form, download the page using cookies, grab those value/name using regular expression ( they follow the same pattern every time) and attach them to your login credentials dynamically. I'll try to show you an example latter.
  15. I can't open the url. what do you want to fetch from there? The token is normal to be generated each time when the page is requested, that's the purpose of it.. Edit: Take a look at my reply #12, you have a similar issue I think.
  16. Thanks Barry. Your support is always appreciated by me. Here's the story. A couple of days ago I had to convert sql scripts from one, old mysql database to firebird. So, because my first clash with databases was with firebird, I've never used this syntax before, because it's completely wrong in firebird, instead I'm using where 1=1, where exists ( select .. from ..) or something similar. I found a lot of queries written like in the above example described by you, maybe that developer was used Dreamweaver, I have no clue, anyway that's not interesting part. I just wanted to know if this syntax has a some special meaning in mysql, obviously not and it could be omitted.
  17. Hey folks. What's the difference b/w the following two queries? I asked this question b/s in some particular situations I find myself not able to get the right result without where 1 in the query. select count(t1.id) from table1 t1 // and select count(t1.id) from table1 t1 where 1
  18. Now, I understand why my wife asked me yesterday whether I've already heard about a virus called bash on the web She is using mac os. Cool pic Philip.
  19. Never used INSERT IGNORE, what insertion result do you get?
  20. Try to pass the link identifier as a parameter. .................or die(mysqli_error($con));
  21. most likely the column names are spelt incorrectly in the query or incorrect data type you're inserting to db. Have you tried to debug it using a mysqli_error() function. Something like $query = mysqli_query($con,"INSERT INTO mxit (ip,time,user_agent,contact,userid,id,login,nick,location,profile) VALUES ($ip,$post_time,$mxitua,$mxitcont,$mxituid,$mxitid,$mxitlogin,$mxitnick,$mxitloc,$mxitprof)") or die(mysqli_error());
  22. There is a wrong sql syntax in it. There would be something similar to $query="SELECT * FROM MyTable WHERE code='GGGGG' or code='HHHHH'"; // or much better using IN condition $query="SELECT * FROM MyTable WHERE code IN('GGGGG','HHHH')"; Note: In SQL, the asterisk or character star (*) symbol is used to indicate that all columns of a table are being referenced.So, it's not recommended of using it, instead you need to specify all of the column names you want to see in the SELECT statement. You could have obtained the same result as the statement using SELECT (*) with something like the following $query="SELECT col_id, col_name, col_pass, etc.... FROM MyTable WHERE code IN ('GGGG','HHHH')";
  23. In addition what mac_gyver said, the status of this if-else-block statement has never been evaluated to "active", in case the $row is unixtimestamp type: if($row['expire'] <= time()){ $status = 'expired'; }else{ $status = 'active'; }
  24. Does anyone already fix the bug. I found something interesting in the error_log file this morning
  25. Opening - yes, a closing tag is optional.
×
×
  • 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.