- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
82 Posted Topics
Re: [code] <form> <select name="sel1" onChange="populateField(this.form)" > <option value="">---Select---</option> <option value="stop" >Stop</option> <option value="start">Start</option> </select> <input type="text" id="eStop" name="eStop" /> </form> <script type="text/javascript"> function populateField(frm){ var test = frm.sel1.value; alert('work '+ test); frm.eStop.value = test; } </script> [/code] It will work fine. Good luck. | |
Re: Ok here my code try to understand First create a table named 'img' in your database as fields and data types mentioned below id int(11) auto_increment img_base_name varchar(50) img_ext varchar(50) img_height int(11) img_width int(11) size varchar(50) Delete img_status enum('Y','N') NO Y Then provide the 'hostname', 'username', 'password', 'database_name' in line … | |
Re: Create a div to next to the text box or any field where you want to display something like. [code]<div id ="err1" style = "display:none">error message</div>[/code] In validation function [code] function val() { if(error_condition) { document.getElementById('err1').style.display = "block"; } } [/code] | |
Re: Is your connection is ok? Error and in what line is your error is showing. mysql_connect("localhost", "DBname", "Password") ????????? What is 'DBname'? Is it a database name. But here it should be the mysql user name. | |
Re: I don't clearly understand your problem. I think <a href="http://www.wordpress.com">www.wordpress.com</a> will do fine. | |
Re: [code] var chkobj = document.fselall['FieldName']; var i=0; if(chkobj[i].checked == true) alert(1); [/code] Try to implement checkbox as an object, by using the above code. Gdluck | |
Re: I think you should use order by clause. And if that does not fit your requirement then you may put them in an array and do a loop using the array and fetch one by one row from the database. GdLuck | |
Re: you can upload by using a simple form. eg : <input type="file" /> More info??? | |
Re: I think in below css body and html something is wrong. I have tried it with removing html {height:100%;} It is working. But in your code it is not working. [code] html { height:100%; width:100%; } body { height:100%; background-color:#f0f0f0; background-image:url(images/white7.jpg); color:#002907; font-family:Verdana, 'Trebuchet MS', Tahoma, sans-serif; /* border:2px ridge … | |
Re: [code] <ul id="wall"> <?php include('insert.php'); $test=mysql_query("SELECT*FROM wall ORDER BY id DESC"); while($row=mysql_fetch_array($test)){ echo "<li class='stbody'><div class='stimg'></div><div class='sttext'>". $row["message"]. "<div class='below'><div class='sttime'>2 seconds ago</div> <div class='help-toggle'>| Help |</div> <div class='trigger_default'><a href='#'>Discuss</a></div> <div class='toggle_container_default'> <ul class='reply_text'> <!--This is where i try to execute the second query where the comment for each wall … | |
Re: Above code is very good I have tried it it is working fine My code is [code] <style type="text/css"> div.divOpaque { color: rgb(0, 0, 0); background-color: rgba(23,23,23, 0.2); } </style> <center> <div class="divOpaque">By Mahavir Senapati</div> </center> [/code] | |
| |
Re: In changeMe js function by js open a popup window with the url and id to it as window.open('changepic.php?id=12','pop1','width=600, height=500'); Then Use in php code receive it as $_GET['id'] and show it and, you can also change there. | |
Re: after [code]<?php session_start(); ?>[/code] You will get a session id like [code]<?php echo $SID = session_id(); ?>[/code] Then use the normal mysql_query() function to insert data to the database like [code]<?php mysql_query("INSERT INTO `table_name`(`column_list`) values('$SID', 'other_values')") ?>[/code] | |
Re: [code] <a href="javascript:window.opener.location.reload();window.close()">Close</a> [/code] It will create a close button in the child window. May this work for you. | |
Re: Be more specific. I can't deduce your problem correctly. So please do so. By the way the facebook buttons are not really buttons, those are images used in their web pages. Facebok also uses API. Those APIs are from facebook.com or [url]http://developers.facebook.com[/url]. Where you can check. | |
| |
Re: [code] <textarea cols="100" rows="15"> <input type="button" /> <input type="checkbox" /> <input type="file" /> <input type="hidden" /> <input type="image" /> <input type="password" /> <input type="radio" /> <input type="reset" /> <input type="submit" /> <input type="text" /> <textarea cols="3" rows="2" style="border:solid 1px"></textarea> </textarea> [/code] It works for me. If you could give code, … | |
Re: [code] var qty = new Array(1,2,3); document.write('<a href="file_name.php?qty='+qty+'">click link</a>'); [/code] In this you can pass the array separated by comma. Can you use this. | |
![]() | Re: [code] <form name="frmName"> Search : <input type="text" size="50" /> <img src="submit.jpg" alt="Submit" width="121" height="60" style="cursor:pointer" onclick="document.frmName.submit()" /> </form> [/code] |
Re: [code] <?php $con=mysql_connect("localhost", "username", "password")or die("cannot connect"); mysql_select_db("db_name",$con)or die("cannot select DB"); if(isset($_POST['Submit'])) { $img_name = $_FILES['images']['name']; $image_name = $_POST['image_name']; $descriptions = $_POST['descriptions']; $img_tmp_name = $_FILES['images']['tmp_name']; copy($img_tmp_name,"upload/".$img_name); $qry = "INSERT INTO `tab_name`(`id`, `image_name`, `descriptions`) VALUES(NULL,'$image_name','$descriptions')"; $res = mysql_query($qry); if($res) echo "Data Saved"; else echo "Sorry, data not saved, try again"; } … | |
Re: I think you should mark this as solved if your problem is solved. | |
Re: What is your problem, please. | |
Re: After submitting the form it is submitted to 'upload.php' so your move_uploaded_file($_FILES["pictures"]["tmp_name"],$_FILES["pictures"]["name"]) or die("Problems with upload"); code should be in that page. | |
Re: I test your code in my local server, it is running fine, but initially showing Hello, ![]() | |
Re: Here is the complete code, but you can modify according to your requirements [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function addText() { var txt = ''; if (window.getSelection) { txt = window.getSelection(); } else if … | |
Re: [code]include("../file1");[/code] | |
| |
Re: [code]$valid = verifyAlphaNum ($username);[/code] You left a semicolon ; at the end | |
Re: Change your code as line no:23 ----->>>> $str = $str . $simb; line no:24 ----->>>> if ($simb == ";") | |
Re: If you are submitting the form to the same page, I think you can get the country value in the page itself, by [code] <?php echo $_POST['region']; ?> [/code] But if you still want the to change the url then you have to call a JavaScript function in which submit … | |
Re: Visit this link below [url]http://www.w3schools.com/php/php_mysql_select.asp[/url] | |
Re: One form can not contain another form. | |
Re: [code] <?php $connection1 = mysql_connect("hostname","username","password",true); $connection2 = mysql_connect("hostname","username","password",true); $db_selected1 = mysql_select_db('db1', $connection1); $db_selected2 = mysql_select_db('db1', $connection2); ?> [/code] It will create a new connection without disturbing the old connection. If you face any problem regarding this again inform me. Good luck. | |
Re: If you just want to remove your warning then just add this [code]if(count($_REQUEST['asgn']))[/code] before your foreach statement as [code]if(count($_REQUEST['asgn'])) foreach($_REQUEST['asgn'] as $checkbox) { //your code } [/code] But if you want to retrieve your value then do the following Add this [code] echo "<form method='post' name='frm1'>"; [/code] before while() i.e. … | |
| |
Re: In line no 4 $sql = "CREATE TABLE news( id INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, title VARCHAR(250) NOT NULL, news TEXT NOT NULL )"; | |
Re: [code] <script type="text/javascript"> function dat() { var date=new Date(); var Month= date.getMonth()+1; var opt = document.createElement("option"); document.getElementById("Monthlistbox").options.add(opt); //document.body.Monthlistbox.option.add(opt); opt.name = 'month'; opt.value = Month; opt.text = Month; alert(opt.text) } </script> <body onLoad="dat()"> <select name="Monthlistbox" id="Monthlistbox"> </select> </body> [/code] Try it | |
Re: Please be more specific about your problem. Hope the below code in your solution [code] <?php for($i = 0; $i<=99; $i++) { if($i%2) echo $i." "; if($i%18 == 0 && $i!=0) echo "<br>"; } ?> [/code] | |
Re: I think you want to display image by fetching from database. If this is the case, then. You can fetch 'image name' or 'path to an image stored' from database and display in the html tag. More info would be better. | |
Re: Try [code]<?php echo row['database_column_name']; ?>[/code] Here 'database_column_name' is the name of the column of the result shown in mysql database by select query. Hope this was your problem.... | |
Re: I have tried it it is working, Below queries are working fine for me $query2 = "UPDATE properties SET $imagenum = '$filename' WHERE id='$id'"; $query2 = "UPDATE properties SET `$imagenum` = '$filename' WHERE id='$id'"; You may be try `$imagenum` (quoted in tilted) rather than '$imagenum' or \"$imagenum\". '$imagenum' or \"$imagenum\" … | |
Re: [code] <?php require_once('database.php'); $query="select * from news"; $result=mysqli_query($dbc,$query); while($row=mysqli_fetch_array($result)){ $NewsId=$row['NewsId'] $Title=$row['Title']; //$Content=$row['Content']; echo $Title; echo "<a href=somePage.php?NewsId=$NewsId>$Title</a><br>"; } ?> [/code] In the somePage.php use following [code] <?php require_once('database.php'); $NewsId = $_POST['NewsId']; $query="select * from news where NewsId = '$NewsId'"; $result=mysqli_query($dbc,$query); while($row=mysqli_fetch_array($result)){ $Content=$row['Content']; echo $Content; } ?> [/code] Or you can … | |
Re: I think you are using OLDER version of PHP server. In older version of php, session is used by session_register() function. So I think either you change your php server or use session_register() function to implement your code. For reference [url]http://www.php.net/manual/en/function.session-register.php[/url] If this not solve your problem then let me … | |
Re: [code] $time = mysql_fetch_array(mysql_query("select now()")); echo $time['now()']; [/code] You can use the $time variable to add the current server time. | |
Re: [code] function showContent(toPopulate) { document.getElementById(toPopulate).innerHTML = "<a href='javascript:showOtherContent(\"toPopulate\");'>show</a>" } function showOtherContent(toPopulate) {alert(toPopulate)} [/code] Above is working | |
Re: $query = mysql_query("SELECT * FROM news ORDER BY news DESC limit 0,5"); Use this One |
The End.