335 Posted Topics
Re: Here is a simple class that uses mysql to get you started. This was just showing you an example.. you would need to sanitize the data and do some validation checking. class Crud { public function edit($data = array(), $row_id) { $query = mysql_query("UPDATE `table_name` SET field_name='{$data['value']}', field_name='{$data['value']}', field_name='{$data['value']}' WHERE … | |
Re: @archie.herbias should prob mark this thread as solved. | |
Re: Can you post more information? Are you using javascript and php or just php? ![]() | |
Re: Maybe this artical will help what you are looking for. [Artical](http://codemug.com/html/custom-scrollbars-using-css/) | |
Re: I think you can use: document.write('<a href="#">'); //rest of the code here document.write('</a>'); | |
Re: Your mail function is not correct. Example: $to = $_POST['user_email']; $subject = "Password Recovery"; $message = "<b>Password Recovery Program.</b>"; $message .= "<p>New Password: ".$gen_rand_pass."</p>"; $header = "From:no-reply@somedomain.com \r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-type: text/html\r\n"; $retval = mail ($to,$subject,$message,$header); if( $retval == true ) { echo "Message sent successfully..."; … | |
Re: looks like your html is broken.. but to answer your question you should use some div's. for the section you are talking about I would split into two divs and float them next to one another. Example: #left-div {float:left; width:50%;} #right-div {float:left; width:50%} .clearFix {clear:both;} <div id="left-div"> <label>TEXT</label> <textarea cols="" … | |
Re: you could create a function and use the function inside your input Example: function checked_array($id) { $array_items = array('1','2','3','4','5'); foreach($array_items as $item){ if($item == $id){ echo 'checked="checked"; } } } <input type="checkbox" name="item[]" value="" <?php checked_array('2'); ?> /> | |
Re: Looks like you figured it out on the site. | |
Re: Hey, was anyone ever able to find the slides? I when to the url provided but got nothing. | |
Re: Try this: $results = $query->result() // Object $results = $query->result_array(); //Array foreach($results as $row){ echo $row['value']; // array method echo $row->value; // Object method } | |
Re: Im writting this on the fly. I haven't tested it, but should get you started. As mentioned above, storing encrypted passwords is how things are done. This script will create a new password and update the database, then send the new password to the user. if(isset($_POST['recover_password']){ if(isset($_POST['user_id']) && isset($_POST['user_email'])){ $pattern … | |
Re: you would have to ftp into the site or goto the directory as follow: wp-content/plugins/woocommerce/assets/css/ You are better off creating a custom.css file and making the changes there.. then include the custom .css file within the header file. | |
Re: Change your br tags `<br />` You really don't need brake tags after div's.. divs are block elements. If you want spacing between div's you should use CSS styling. Looks like you are missing a forward slash in your href. `<font>` is not really used anymore. should use CSS style … | |
Re: MiniTool Power Data Recovery This works like a charm! | |
Re: `SELECT * FROM table WHERE date_created BETWEEN $date1 AND $date2` | |
Re: What are you trying to save to the database? the path string or the photo itself. if you are saving the path, you need to post the upload processing code for us to review. If you are saving the photo into the database, you need to use blob in the … ![]() | |
Re: What are you using to generate the array? Maybe you could change the way the array is created. like so.. array('name' => 'value'); | |
Re: you could try installing mysql workbench.. This will install mysql server on your system and you can create your database's with the workbench. | |
Re: I did this and got a list of file within my clientportal directory, try a forward slash in your path before images and make dirformroot an array. foreach(glob('/www/ci/clientportal/{*.php,*.html,*.sql}',GLOB_BRACE) as $num => $dirr){ $dirroot[] = $dirr; } var_dump($dirroot); exit; Results: array (size=2) 0 => string '/www/ci/clientportal/index.php' (length=30) 1 => string '/www/ci/clientportal/cp_client_portal-barebones.sql' … | |
Re: you could also check is session email is set if(isset($_SESSION['email']){ $email = $_SESSION['email']; $query = mysql_query("SELECT * FROM table_name WHERE email = '$email' "); if(!$query){ die('Query Failed!'.mysql_error()); } $return = mysql_fetch_assoc($query); } | |
Re: Try this for your upload path. $upload_path = $_SERVER['DOCUMENT_ROOT'] . '/uploads/'; if(!file_exists($upload_path){ mkdir($upload_path); } | |
Re: Try this: `<img src="<?php echo $imgloc; ?>" alt="" width="700" />` | |
Re: Well you could use a plugin to add to your header.php file. or you could create a slider and place the code in the header.php file. If you are making a custom theme you should find a slider that you like and incorporate into you theme. You should create a … | |
Re: Depending on the code you are using, inside your textarea you need to echo out the value of the saved textarea.. same goes for text fields | |
Re: I believe your query is wrong. If you want to increment the count when a user clicks you would need to add count plus 1 $query = mysql_query("UPDATE count SET count = (count + 1) WHERE username = '$username'"); //Check if query has ran. if(!$query){ die('Error with query').mysql_error(); } | |
Re: This new act is bs... let me decide what I want to do about my heath care, let me decide who has access to my personal information, let me decide who I want to give my money too. Penalty or jail for not signing up with a load a crap.. … | |
Re: Well to answer his qustion so he can stop: in CodeIgniter redirect(); is basiclly just a what the name says.. redirect.. you can insert a params to controll how you want to redirect. Example: redirect('/'); = redirect back to main domain. or redirect('dashboard'); = redirect back to the dashboard page. | |
Re: Try this: var svreg = document.getElementById("getautomobile").value; var svreg2 = documnet.getElementById('getautomobile2').values; http.open("GET", url + escape(svreg) + "¶m=" + escape(svreg2), true); Personally I would use jquery.Jquery makes it realy easy to use ajax. jQuery(document).ready(function($){ $.post('someurl', {param1: $('#id1').val(), param2: $('#id2').val();}).done(function(data){ console.log(data); }); }); | |
Re: This should redirect on any server.. If it should fail, I believe it will have to do with your redirect string. `header("Location: " . $insertGoTo); exit();` | |
Re: Can you be more specific? What are you looking for? How to create a login page? | |
Re: change your fetchData method public function fetchData() { $sql = " select * from desc_tbl"; $res = mysql_query($sql); $data = array(); while($row = mysql_fetch_assoc($res)){ $data[] = $row; } retrun $data; } in your test.php you can then create a table that will echo out the fetchData() | |
Re: looks like your database library is not loaded. You can autoload in the config/ directory in the autoload.php file.. you can add database to the $autoload['libraries'] array(). Or your can call the library by itself. In my opinion your controller and models are a bit complicated. Here is how I … | |
Re: Here is what I would do to improve your code a bit. database data output: echo '<table border="1"> <thead> <tr> <th> </th> <th>ID</th> <th>TITLE</th> <th>AUTHOR</th> <th>SECONDARY TITLE</th> <th>YEAR</th> <th>VOLUME</th> <th>NUMBER</th> <th>PAGES</th> </tr> </thead> <tbody>'; while($row = $sql->fetch()){ echo '<tr>'; echo '<td><input type="checkbox" name="checkbox[]" value="'.$row['id'].'" /></td>'; echo '<td>'.$row['title'].'</td>'; echo '<td>'.$row['author'].'</td>'; echo '<td>'.$row['secondar_title'].'</td>'; … | |
Re: Here is a simple example of how you would go about setting this up. This code is old style of mysql, you would be better off using PDO. You can see the database settings are defined at the top, then the mysql connection is made using the settings. After the … | |
Re: looks like you need to run another query after user has activated the membership. He is a short example, note: mysql_insert_id() will be removed in future version of php.. As diafol suggested, you should move to pdo or mysqli if(!$result){ //Run Error code }else{ $new_id = mysql_insert_id(); $new_member = mysql_query("INSERT … | |
Re: Have you thought about using jquery or some javascript to check your input fields before sending? I would combine javascript and php methods to ensure your data is secure. Looking at your code your need to fix a couple of things with your if statement. Checking if $_POST is empty … | |
Re: If you would like to have all records displayed you need to use a while loop or a foreach loop. echo '<div>'; while($row = mysql_fetch_array($stm, $conn)){ echo '<p>row: '.$row.'</p>'; } echo '</div>'; This loop will produce. <div> <p>row: 1</p> <p>row: 2</p> <p>row: 3</p> <p>row: 4</p> <p>row: 5</p> <p>row: 6</p> <p>row: … | |
Re: My vote would be to use codeigniter for a beginner, then move over to something more heavy like Zend. Codeigniter is very easy to user and has a small learning curve. A person could build a dynamic website with codeigniter in about four to five hours depending on complexity. | |
Re: You could try something like this.. you will need to change the css. I didn't test it out but you can get the just of it. <form action="" method="" /> <h3 class="table-head">Table Header</h3> <div class="table-row"> <label class="row-label">Label</label> <div class="row-input"> <input type="text" name="" value="" /> </div> </div> <div class="table-row"> <label class="row-label">Label</label> … | |
Re: Try this out for your buttons .button-box { float:left; margin-right:20px; margin-bottom:10px; } <div class="button-box"> <input type="submit" name="" value="" /> <input type="hidden" name="" value="" /> </div> | |
Re: How is php to know what javascript is? You should create ajax call and send json back to the server for processing. then you can do `decode_json(args);` | |
Re: You can use jquery to create a new ajax call and check input values.. if values are null or empty return from php with error message. This is just one way of doing it. $(document).ready(function(){ $("#button").on('click',function(){ var name = $('#name').val(); var email= $('#email').val(); var data = 'name=' + name + … | |
Re: you dont need to instanciate a new wp_query if you are in your template fine.. you just need to use query_post() function with arguments. Here is the codex. [link](http://codex.wordpress.org/Function_Reference/query_posts) <?php // The Query query_posts( $args ); // The Loop while ( have_posts() ) : the_post(); echo '<li>'; the_title(); echo '</li>'; … | |
Re: This is known as a white space issue. Somewhere in the code white space is getting outputted. Try using ob_start() after session_start() to flush to your code. I would also recommend taking your database code out from under <head> and move to top of the page into a function. Example: … | |
Re: I would suggest try using [Color Box](http://www.jacklmoore.com/colorbox/) and adding your webform with inline html. Then when a user clicks login or add to wishlist the form will popup | |
Re: What are you asking? Are you asking about the addMeta() functions? If you are, look at what you are doing? You are overwriting the first function with the second. If you need to have them displayed on two different pages try adding some logic. if( is_some_page() ){ $response->addMeta('title','something'); }else{ $response->addMeta('title','something'); … | |
Re: I somewhat agree with ppl above. I would not use a framework if you are learning to develop. That goes for html, css, php ,jquery... etc. You need to be able to hand code and understand what you are coding first. This is a long process and takes time but … | |
Re: Im going to say on your first index file, its your db connection. I tested your code and everything worked fine. // Parse the log in form if the user has filled it out and pressed "Log In" if (isset($_POST['username']) && isset($_POST['password'])) { $manager = preg_replace('#[^A-Za-z0-9]#i', '', $_POST['username']); // filter … |
The End.