Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Everything posted by Q695

  1. fiddle: http://jsfiddle.net/v9s6d/ on page: //js (javscripts.js) page: <script TYPE='text/javascript'> function whitespace() { var new_html = document.getElementById('new_html').value; document.getElementById('bubble').innerHTML = new_html; } </script> //header stuff: <script type='text/javascript' src='javascripts.php'></script> //body stuff: <p>Welcome to the site <b ID='bubble'>dude</b> </p> <INPUT TYPE='text' ID='new_html' VALUE='Enter Text Here' /> <INPUT TYPE='button' ONCLICK='whitespace()' VALUE='Change Text' /> Problem: When I run the fiddle it works, but when I run the javascript, the dynamic changing doesn't work. Goal: make a function that can change the bubble data when I click the corresponding link
  2. The code I was executing doesn't work with an && but it works with a '.' in a TRUE case statement.
  3. I found this bug in phpMyAdmin: phpMyAdmin - Errorindex.php: Missing parameter: import_type<a href="./doc/html/faq.html#faqmissingparameters" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a> index.php: Missing parameter: format<a href="./doc/html/faq.html#faqmissingparameters" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a> What I did to find it: log in run an SQL statement let the session expire log back in hello ERROR!!!!!
  4. Then why was the && failing, but the . succeeding?
  5. I mask for posting purposes that way you can put in whatever you want for the var names.
  6. Sounds like Dreamweaver check in/check out, but on a php/MySQL level.
  7. $i gets loaded when the first case statement is true, but when the $_GET is false it sees no need to load $i, thus false when I put _______ you can pass any variable into the field that you want. I know the code works in my case statement, but I don't know exactly why it lets you pass the variable in, then run the check.
  8. I was basing it off this logic working, never actually tested it by writing it out, because I thought it was some big new discovery, because "&&" doesn't work, but "." does. isset($_GET['____']) && $i=$_GET['____'] . is_int($i)
  9. So it keeps the tags that I don't list?
  10. If you're using a switch statement you should know how to debug it if someone helping you forgets a {. Was the Psudo code correct? Why does the "." allow you to put more instructions between an and when testing the TRUE of a statement?
  11. The errors are on those lines in those codes, so look at the lines, and look at the PHP documentation for different scripts.
  12. You should use blob, not varchar, or do something like my solution at: http://forums.phpfreaks.com/topic/286668-phpmyadmin-blob-insert-error/
  13. Does anyone know why the following code is stripping everything, instead of nothing until I turn off what I don't want people to use: $html5 = ' <menu> <command> <summary> <details> <meter> <progress> <output> <keygen> <textarea> <option> <optgroup> <datalist> <select> <button> <input> <label> <legend> <fieldset> <form> <th> <td> <tr> <tfoot> <thead> <tbody> <col> <colgroup> <caption> <table> <math> <svg> <area> <map> <canvas> <track> <source> <audio> <video> <param> <object> <embed> <iframe> <img> <del> <ins> <wbr> <br> <span> <bdo> <bdi> <rp> <rt> <ruby> <mark> <u> <b> <i> <sup> <sub> <kbd> <samp> <var> <code> <time> <data> <abbr> <dfn> <q> <cite> <s> <small> <strong> <em> <a> <div> <figcaption> <figure> <dd> <dt> <dl> <li> <ul> <ol> <blockquote> <pre> <hr> <p> <address> <footer> <header> <hgroup> <aside> <article> <nav> <section> <body> <noscript> <script> <style> <meta> <link> <base> <title> <head> <html> '; $_________=$_POST['_____']; $__________=strip_tags($_______, '$html5');
  14. use a log in script to register the user, and use a session variable to allow the user to only change the pages they wrote.
  15. 2.No, I just haven't turned on strict 3.On another file it runs perfectly fine with one '.' in between to load a number in 4.Why wouldn't it create errors in WAMP, but create errors in the PHP server for other hosts?
  16. Rather than doing a case that way you could get the length in a case statement via switch (TRUE) case (isset($_POST['str']) && $str=$_POST['str'] . $length=strlen($str) . $length>=15): echo "string is 15 char or longer."; break; default: echo "string is shorter than 15 char."; } I know it's a little bit different, but it seems to work with '.' loading for some reason, but I don't know why.
  17. Solved it this way: <?php if (isset($_FILES['video']) && $_FILES['video']['error']==0 && $_FILES['video']['size']<=209715200 && $_FILES['video']['type']=='video/mp4'){ $target_path="video/___/"; $img_name=$_FILES['video']['name']; $img_type=$_FILES['video']['type']; $img_size=$_FILES['video']['size']; $img_tmp_name=$_FILES['video']['tmp_name']; move_uploaded_file($img_tmp_name, $target_path.$___.".mp4") or die ("Video Upload Error, Please Try Again."); echo "Video successfully uploaded"; } else if(isset($_FILES['video']) && $_FILES['video']['size']>=1) { echo"Please try to upload your video again."; } ?> There may be a better way to do this, but I'm happy for now.
  18. Screw my original plan, renaming a file upon upload is looking a lot more comfortable now.
  19. I just got the upload to work with a video the size of 452 KB (463,539 bytes), just need to scale it up to a max of 100MB, possibly more later.
  20. ( ! ) Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 37280537 bytes) in ___________________phpmyadmin4.0.4\tbl_replace.php on line 229 Call Stack # Time Memory Function Location 1 0.0282 357312 {main}( ) ..\tbl_replace.php:0 2 0.9770 100010840 implode ( ) ..\tbl_replace.php:229 the test file is: 17.7 MB (18,640,198 bytes)
  21. So this doesn't work <?php ini_set('upload_max_filesize', '200M'); ?> That stuff worked to get the array output my.ini: # Example MySQL config file for medium systems. # # This is for a system with little memory (32M - 64M) where MySQL plays # an important part, or systems up to 128M where MySQL is used together with # other programs (such as a web server) # # You can copy this file to # /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options (in this # installation this directory is C:\mysql\data) or # ~/.my.cnf to set user-specific options. # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "--help" option. # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [wampmysqld] port = 3306 socket = /tmp/mysql.sock key_buffer = 16M max_allowed_packet = 1M sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M basedir=c:/wamp2/bin/mysql/mysql5.6.12 log-error=c:/wamp2/logs/mysql.log datadir=c:/wamp2/bin/mysql/mysql5.6.12/data # Don't listen on a TCP/IP port at all. This can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # #skip-networking # Disable Federated by default skip-federated # Replication Master Server (default) # binary logging is required for replication log-bin=mysql-bin # binary logging format - mixed recommended binlog_format=mixed # required unique id between 1 and 2^32 - 1 # defaults to 1 if master-host is not set # but will not function as a master if omitted server-id = 1 # Replication Slave (comment out master section to use this) # # To configure this host as a replication slave, you can choose between # two methods : # # 1) Use the CHANGE MASTER TO command (fully described in our manual) - # the syntax is: # # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, # MASTER_USER=<user>, MASTER_PASSWORD=<password> ; # # where you replace <host>, <user>, <password> by quoted strings and # <port> by the master's port number (3306 by default). # # Example: # # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, # MASTER_USER='joe', MASTER_PASSWORD='secret'; # # OR # # 2) Set the variables below. However, in case you choose this method, then # start replication for the first time (even unsuccessfully, for example # if you mistyped the password in master-password and the slave fails to # connect), the slave will create a master.info file, and any later # change in this file to the variables' values below will be ignored and # overridden by the content of the master.info file, unless you shutdown # the slave server, delete master.info and restart the slaver server. # For that reason, you may want to leave the lines below untouched # (commented) and instead use CHANGE MASTER TO (see above) # # required unique id between 2 and 2^32 - 1 # (and different from the master) # defaults to 2 if master-host is set # but will not function as a slave if omitted #server-id = 2 # # The replication master for this slave - required #master-host = <hostname> # # The username the slave will use for authentication when connecting # to the master - required #master-user = <username> # # The password the slave will authenticate with when connecting to # the master - required #master-password = <password> # # The port the master is listening on. # optional - defaults to 3306 #master-port = <port> # # binary logging - not required for slaves, but recommended #log-bin=mysql-bin # Point the following paths to different dedicated disks #tmpdir = /tmp/ #log-update = /path-to-dedicated-directory/hostname # Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = C:\mysql\data/ #innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_group_home_dir = C:\mysql\data/ #innodb_log_arch_dir = C:\mysql\data/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M #innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 5M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [isamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer_size = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysqld] port=3306
  22. So this doesn't work <?php ini_set('upload_max_filesize', '200M'); ?> That stuff worked to get the array output
  23. I moved all the files to the new version of WAMP, but now I can upload 2 images, but not a video in any way/shape/form through var_dump($_FILES);.
×
×
  • 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.