- Interests
- php jquery ajax javascript css
72 Posted Topics
Re: <?php session_start(); // Starting Session include_once('config.php'); $error=''; // Variable To Store Error Message if (isset($_POST['submit'])) { if (empty($_POST['user']) || empty($_POST['pass'])) { $error = "Please complete both fields"; } else{ // Define $username and $password $user=$_POST['user']; $pass=md5($_POST['pass']); // To protect MySQL injection for Security purpose $user = stripslashes($user); $pass = stripslashes($pass); … | |
I have this code foreach loop it will get the first data form my table every iteration on the next output. I would like to have a guidance on this <select class="selectpicker form-control" data-live-search="true"> @foreach ($IncidentTypes as $Incident) <optgroup label="{{ $Incident->incident_type ." ". $Incident->id }}"> @foreach ($Incident->IncidentSubType as $subTypes) <option> … | |
Hi there been having this problem for a while now and i need guidance the only thing that is showing me only **111** when looping through i have 3 data in my database and its not showing me the result i want any ideas?? thanks in advance **edit** the result … | |
Hi there I have this problem on how to access the website/server without using IP address im using xampp as a trial for this. im always using IP's instead of names. I would like to know more on how to customize my Public Static IP(121.xxx.xxx.xxx) to name(www.mysite.localserver) like that | |
Re: since there is HTML5 you only need the css command for favicons Create a 16x16 image the file extension should only be `.ico` `<link rel="shortcut icon" href="/images/specialicon.ico" type="image/x-icon" />` OR `<link rel="icon" href="/images/specialicon.ico" type="image/x-icon" />` | |
Re: since you want to create a random questionare you will need all the questions in order from min - max numbers you will use the `rand(min,max);` command for this is already given By `rubberman` | |
Re: Hi there learner001 I could ask you is this a socialnetwork site? and if you want the profile page of different users + thier own file inside a folder which the can only see for themselves? | |
Re: you can do it this way its much more easier to make them like this foreach($result as $key => $row) { ?> <tr> <td> <?= $row['ID'] ?> </td> <td> <?=$row['URL'] ?> </td> <td> <?=$row['Editor'] ?></td> <td><a id='more' href='http://www.niloofar3D.ir' onClick='return popup(this, 'mypopup')'><button>»</button></a></td>"; </tr> <?php } ?> | |
Re: <?php $timeout_query = "SELECT * FROM presence where timein >= (your default time in)"; $recordset = mysqli_query($connection, $timeout_query); //show records of the late time in's while($record = mysqli_fetch_array($recordset)) { $lasttimein = $record['timein']; $lasttimeout = $record['timeout']; $clock_in_eve = $record_row['clock_in_eve']; $clock_in_nite = $record_row['clock_in_nite']; } | |
Re: have you tried `overflow:visible;` Update: #outerWrapper { width: 860px; height: 2135px; /*Edited min-height: 98% */ margin: 0px auto; /* background-image: url('../images/orangegrad.png'); */ background-repeat: repeat-x; background-color: #ffcc99; overflow: visible; } I have this code from fire buggin your site so far this works fine but i guess its only on one … | |
Re: Stored procedures will give you a small performance boost, but mostly they are for doing tasks that are difficult or impossible to do with a simple query. Stored procedures are great for simplifying access to data for many different types of clients. Database administrators love them because they control how … | |
Re: use sessions to pass a variable from login.php to main.php as a key to determine which button is gonna be shown ![]() | |
Re: is it autoincrement or the manual increment of your own desired coding? | |
Re: do you have distinct values? so it can be call easier like status. mysql query would be like this SELECT `id`,`name`,`class`,`marks` FROM tbl_name WHERE name='S' | |
Re: **About Yii Framework** A fast, secure, high performance PHP framework for developing web 2.0 applications, Yii is simply a fine tool. Yii stands for Yes It Is ! This open source component based framework has helped the Yii development team to a great extent. It comes with interesting and fabulous … | |
Re: in line 6 `var file2 = file.split(" ", 2);` remove the comma and the number it should be like this `var file2 = file.split(" ");` | |
Re: Im gonnag give my suggestion like this although this is only an example Use localStorage for it. Here is JSFiddle Example of it. [Link](http://jsfiddle.net/CC2hC/1/) Code behind it: HTML Code: <input type="checkbox"> JS Code: $(function(){ var test = localStorage.input === 'true'? true: false; $('input').prop('checked', test || false); }); $('input').on('change', function() { … | |
Re: you need to change line 25 to this format `$result->fetch_assoc()` ![]() | |
Re: your missing the very important thing on your code `<form method="POST">` I would like to point out that one you cant `POST` your `DATA` without that command | |
Re: Hello there @Gl753 I can suggest/assist you about using HTML5 with the support for those things like email numbers and etc. you can use those so that you wont have a hard time using javascript. [w3schools](http://www.w3schools.com/html/default.asp) **note:** this is only a suggestion. | |
Re: try this. its also validated <?php // Check if image file is a actual image or fake image if(isset($_POST["submit"])) { $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["upload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); $check = getimagesize($_FILES["upload"]["tmp_name"]); if($check !== false) { echo "File is an image - " . $check["mime"] … | |
Re: `<?php the_content( $more_link_text , $strip_teaser ); ?>` Codes like this is from wordpress. it has its own codes for it CMS. The Usage of that code is Like a movie trailer. in order to see the full description you need to click the `$more_link_text` + `$strip_teaser` to see the full … | |
Re: using your code i tidied it up a bit the alert box is working. <?php include("connect.php"); $cat_id=$_REQUEST['cat_id']; $search_key=$_REQUEST['search_key']; if($search_key != ""){ $sql=mysql_query("SELECT * FROM tbl_products WHERE title LIKE '%$search_key%' OR short_descrp LIKE '%$search_key%' OR description LIKE '%$search_key%'")or die(mysql_error()); $count=mysql_num_rows($sql); if($count > 0){ while($row_city=mysql_fetch_array($sql)) { ?> <div class="section group"> <div class="city"> … | |
Re: Here Try this. I hope it works <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script> function show_message(msg) { $("#msg_div").fadeIn(20); $("#msg_div").html(msg); $("#msg_div").fadeOut(9999); } function getval() { var currentTime = new Date() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() if (minutes < 10) minutes = "0" + minutes; var suffix = "AM"; if (hours >= 12) … | |
Re: there are some specification on hosting sites sometimes to make it more secure. but localy you dont need much security on a standalone computer or your localhost. | |
Re: Hmmm. This may help you [Click Here](http://mpdf1.com/manual/index.php?tid=452) that is mpdf as i know from google it can convert any file types from .jpg .doc .docx to pdf | |
Is there anyway i can change this code to a ajax format? $(document).ready(function(){ $("td[contenteditable=true]").blur(function(){ var msg = $(".alert"); var newvalue = $(this).text(); var field = $(this).attr("id"); $.post("update.php",field+"="+newvalue,function(d){ var data = jQuery.parseJSON(d); msg.removeClass("hide"); if(data.status == 200){ msg.addClass("alert-success").removeClass("alert-danger"); }else{ msg.addClass("alert-danger").removeClass("alert-success"); } msg.text(data.response); setTimeout(function(){msg.addClass("hide");},1000);//It will add hide class after 3 seconds }); }); … | |
Re: another answer to this question is the `required` command in **HTML5** use this reference [Click Here](http://www.w3schools.com/tags/att_input_required.asp) | |
Re: sanitizing your code: $p = $_GET['p']; $new_p = filter_var($p, FILTER_SANITIZE_STRING); for example this is input of the user that has html codes `$p = <h1>Hello</h1>` this is the one sanitized it will remove all unwanted characters `$new_p = Hello` | |
Re: most of the time the link on the image is downloadable like this: `<a href='imagelocation'>download</a>` or if you want to download any files check the link [Click Here](http://www.webinfopedia.com/php-file-download-script.html) | |
Re: The simplest way to get the visitor’s/client’s IP address is using the `$_SERVER['REMOTE_ADDR']` or `$_SERVER['REMOTE_HOST']` variables. However, sometimes this does not return the correct IP address of the visitor, so we can use some other server variables to get the IP address. The below both functions are equivalent with the … | |
Re: Just using your codes this should make it work <?php $username = "USERNAME"; $password = "PASSWORD"; $hostname = "127.0.0.1:3306"; //connection to the database $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); //select database $selected = mysql_select_db("Strong_Links",$dbhandle) or die("could not select database"); $result = mysql_query("SELECT content FROM web … | |
Re: Please read the manual for reference [Click Here](http://php.net/manual/en/function.mysql-fetch-row.php) It will be remove soon so stop using mysql_* This extension is deprecated please use **PDO** or **MySQLi** | |
Re: Try this codes. its not on .xlxs but on .csv $result = mysql_query("SELECT * FROM photo where flag='active'") if (!$result) die('Couldn't fetch records'); $num_fields = mysql_num_fields($result); $headers = array(); for ($i = 0; $i < $num_fields; $i++) { $headers[] = mysql_field_name($result , $i); } $fp = fopen('php://output', 'w'); if ($fp … | |
I'm using pure php for the moment and I'm having a problem on what to do next using the command `DESCRIBE` calls all the header of my database but I cannot call those datas under the headers I have to manually put it. What I want to know is: * … | |
Re: Since that is your error > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in .... line 16 > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in .... line 60 It says it cannot find a match or data in your database table have you … | |
Re: You need to set the value of upload_max_filesize and post_max_size in your php.ini : ; Maximum allowed size for uploaded files. upload_max_filesize = 40M ; Must be greater than or equal to upload_max_filesize post_max_size = 40M After modifying php.ini file(s), you need to restart your HTTP server to use new … | |
Re: Try this tutorial for beginners [Click Here](http://www.sitepoint.com/php-gallery-system-minutes/) | |
Re: Do use this **fancyapp** there is a demo gallery inside like the one you requested. it is in demo folder you will find an index.html just open with sublime(any other programming software you have) you will find the **codes** and the **java scripts** also some **CSS** there | |
Re: Try this <?php $customer_id = $_POST[Customer_ID]; $first_post = $_POST[First_Post]; $sur_name = $_POST[Sur_Name]; $cus_address = $_POST[Cus_Address]; $Phone_Num = $_POST[Phone_Num]; $cus_email = $_POST[Cus_Email]; $Product_Purchase = $_POST[Product_Purchase]; //Print the Code so you can notice any error in the fields you insert echo $sql_query = "INSERT INTO customertable( `CustomerID`, `FirstName`, `SurName`, `Address`, `PhoneNum`, `Email`, … | |
Re: Lets hope for the best Try this one please? <?php session_start(); require('connect.php'); if(isset($_SESSION['username'])) { $dir="image/"; $file_name=$dir.basename($_FILES['uploads']['name']); $fileUpload=1; $imageType=pathinfo($file_name,PATHINFO_EXTENSION); $image= addslashes(file_get_contents($_FILES['uploads']['tmp_name'])); $image_name = addslashes($_FILES['uploads']['name']); $image_size = getimagesize($_FILES['uploads']['tmp_name']); if(move_uploaded_file($_FILES['uploads']['tmp_name'], $file_name)) { echo "uploaded succesfully" ; echo "<img src='$file_name' width='50px' height='50px'>"; $querry="SELECT image FROM users WHERE username='$username'" or die(mysql_error()); $result=mysql_query($querry) or die(mysql_error()); $row=mysql_fetch_assoc($result) … | |
Re: Well you could do something like showing some messages to know it like this: $query="SELECT staffID,name,surname,email FROM stafftable"; $do=$con->prepare($query); $do->execute(); $record=$do->rowCount(); if($record>0){ echo "Record found"; }else{ echo "No record found"; } | |
I have this simple problem but im still newb to vb.net where i should Reverse the "hello world" and the result "olleh" without the world without using any function like strReverse() its very hard for me any ideas would be helpful | |
Re: im sensing the line 53 of yours is an error echo "<img src="data:image/jpeg;base64,'.base64_encode($pics).'"/>"; would you try to decode that part that may help | |
Im having a problem using foreach i cant seem to understand this yet. my problem is when i enter all the data needed it shows many inserting code I cant seem to figure this out This is the Output INSERT INTO `dependents`(`d_name`, `d_age`) VALUES (1,1) INSERT INTO `dependents`(`d_name`, `d_age`) VALUES … | |
how do i insert the textboxes with different data inside of them in one database table i have this code dunno what to do next Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click Dim sql As String Dim totcount As Integer = 0 Dim inc As … | |
hi there im a total newb at this programming language is there a way 3 databases can be in one datagridview? I can only insert 1 database in a datagrid | |
Re: try this command: var chkbox = $("#check"), button = $("#del_event"); button.attr("disabled","disabled"); chkbox.change(function(){ if(this.checked){ button.removeAttr("disabled"); }else{ button.attr("disabled","disabled"); } }); hope this helps | |
Re: you can use a counter for that method i already guess you can insert the thing's there you only needed the counter Do this 2 step 1. Add a table counter 2. loop it $count = 1; $sql = "SELECT * FROM table_name"; $query = mysql_query($sql); while($get_data = mysql_fetch_assoc($query)){ $counter_data … |
The End.