- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
61 Posted Topics
Re: [QUOTE=;][/QUOTE] [CODE]<form action='page.php' method='post'> <input type='checkbox' name='chk' value='value1'> ANY VALUE 1 <br> <input type='checkbox' name='chk' value='value2'> ANY VALUE 2 <br> <input type='checkbox' name='chk' value='value3'> ANY VALUE 3 <br> <input type='checkbox' name='chk' value='value4'> ANY VALUE 4 <br> <input type='submit' name='submit' value='Get Value'> </form>[/CODE] page.php codes: [CODE]<?php $value = $_POST['chk']; echo $value; … | |
Hi to All, Can anyone show me a sample alarm script using php or javascript? The alarm was base on the record at the database. I mean, for example I have records that have overdue, the user is the one who state the overdue. For example, the user input his … ![]() | |
![]() | Re: [QUOTE=;][/QUOTE] Just use dot (.) [code] <?php $text1 = "World"; echo "Hello ".$text1; //The output will be Hello World $text2="Hello"; echo $text2." World"; //The output will be Hello World ?> [/code] |
Hi all, Can anyone help me or give me an idea on how export data from mysql into multiple excel sheet using php? Below is the code I used to export data from mysql in a single excel sheet. thanks in advance [code] <?php $filename = 'filename.csv'; include 'connection.php'; $date … | |
Hello Guys, Can anyone help me regarding this search engine I want to implement on my script? Let's say i have 5 files (file11.txt, file12.txt, file13.txt, file14.txt and file15.txt) on my folder named FILES. Now i want to write script that when i search for a particular words, it will … | |
Re: [QUOTE=;][/QUOTE] you can use submit instead of button. try to analyze this code. [code] //assume that the file name of this script is test.php <?php if($_POST['submit']=="Test") { echo "test"; } echo "<form action='test.php' method='post'>"; echo "<input type='submit' name='submit' value='Test'>"; echo "</form>"; ?> [/code] | |
Hi to all, Can anyone help me to show the code how to save multiple data into mysql via PHP? Thanks in advance. Here's some code [code] <?php echo "<form action='savetoanothertable.php' method='post'>"; $query = mysql_query("SELECT * FROM tbl_student"); while($result = mysql_fetch_array($query) { echo "<input type='text' name='studname' value='$result[studentname]'>"; echo "<input type='text' … | |
Hello Guys. Is there anyone here who can help me how to add shadow in div (browser is IE8). Thanks. This Code doesn't work. [code] </style type='text/css'> .main_div { width:100; height:100; -webkit-box-shadow: #111 0 -2px 6px; -moz-box-shadow: #111 0 -2px 6px; box-shadow: #111 0 -2px 6px; } </style> <div class='main_div'> … | |
Re: [QUOTE=;][/QUOTE] I think this can help you. [code] <?php $t1 = strtotime('2011/09/19 09:18:22 AM'); $t2 = strtotime('2011/09/22 03:22:18 PM'); $delta_T = ($t2 - $t1); $day = round(($delta_T % 604800) / 86400); $hours = round((($delta_T % 604800) % 86400) / 3600); $minutes = round(((($delta_T % 604800) % 86400) % 3600) / … | |
Hello Guys, Can anyone help me to get time difference in PHP? For example: [code] <?php $Start = "09:18 AM"; $End = "04:10 PM"; $diff = ???? [/code] Can anyone show the code for $diff? thanks in advance and more power. | |
Hi to All, Is this code can be done with link <a hef=''>? [code] <?php echo "<form action='page.php' method='post'>"; echo "<input type='submit' name='submit' value='Go to Page'>"; echo "</form>"; if($_POST['submit']=="Go to Page") { } ?> [/code] in the code above, once the user click the button, the page load and execute … | |
Can anyone clarify how I can use a sliding div animation like the one here but instead of using displaying a div on the same page, it loads a new page and then unveils the div. ie. I want to use it for my navigation links which go to different … | |
Hi to all, I am PHP developer and found many problems regarding cross browser issue. Here's the problem: I want a rounded div with shadow. My CSS codes works at FF but not in google chrome. Please help. Thanks in advance. Here's my code: [code] <style type='text/css'> .main{float:none;position:relative;width:980;background:white;height:500;margin:0px auto;top:10;} #shadowBox … | |
Re: [QUOTE=;][/QUOTE] I have same problem as samsnov. The problem can be call as cross browser issue. For example, when you run the script into IE, the design looks fine. But when you run it using FireFox, you can found many problem regarding its design. Can anyone here give some advise … | |
Re: [QUOTE=;][/QUOTE] Maybe it can by signing out into the website and not by closing the browser. ![]() | |
Hi everyone, I need some help now. Can anyone show me a script on how can shared folder (not folder on the server) open using php? I mean my server's IP is 10.10.10.1 and then some shared folder are on the IP 10.10.10.2. Now I want to access the shared … | |
Re: [QUOTE=;][/QUOTE] Try this idea. [code] <?php // sql connection here $query = mysql_query("select * from tbl_name order by number_of_jobs desc"); while($result=mysql_fetch_array($query)) { echo $result['company_name']; echo $result['number_of_jobs']."<br>"; } ?> [/code] | |
Re: [QUOTE=;][/QUOTE] Try this. [code] <?php // your database connection here echo "<select name='dropdown1'>"; $query = mysql_query("SELECT * from employeedetails"); while($result=mysql_fetch_array($query)); { echo "<option name='id_list'>".$result['EmployeeID']."</option>"; } echo "</select>"; ?> [/code] | |
Re: [QUOTE=;][/QUOTE] You can use substr. Example. [code] <?php $date="March 21, 2011 - 06:30 PM"; $time = substr($date,17,8); // this means you will eliminate 17 characters (March 21, 2011 - ) "including the space", and then print out the 8 characters. echo $time; // the output will be 06:30 PM ?> … | |
Re: [QUOTE=;][/QUOTE] Just place the delete query into the top of display query. Sample [code] <?php $sql="DELETE FROM table_name WHERE id='$ids'"; $query=mysql_query("select * from tbl_name"); while($result=mysql_fetch_array($query)) { //blah blah blah } [/code] | |
Re: [QUOTE=;][/QUOTE] You can refer to this idea. Lets say you have name, address and id to your table both table a and b. [code] <?php $query = mysql_query("SELECT * FROM table_a"); while($result = mysql_fetch_array($query)) { $name = $result['name']; $address = $result['address']; $id = $result['id']; mysql_query("INSERT INTO table_b (name,address,id) values('$name','$address','$id')"); mysql_query("DELETE … | |
Re: [QUOTE=;][/QUOTE] Hi Kadafiz. Try this idea. 1. You can restrict the "userID text box" to make it accept only integers (0-9) using javascript. here's the code. [code] <HTML> <HEAD> <SCRIPT language=Javascript> function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 … | |
Re: [QUOTE=;][/QUOTE] Try this [code] <?php if($_POST['submit']=="Submit") { $text1 = $_POST['text1']; $text2 = $_POST['text2']; if($text1 =="" || $text2=="") { ?> <head> <script type='text/javascript'> alert('Some text here.'); </script> </head> <?php } else { //what do you want when the two textbox have value } } echo "<form action='index.php' method='post'>"; echo "<input type='text' … | |
Re: [QUOTE=;][/QUOTE] You can now mark this thread as "Solved" | |
Re: [QUOTE=;][/QUOTE] There are lots of tutorial inside the net. Try to google it. The tutorials are easy to follow. | |
Re: [QUOTE=;][/QUOTE] It depends on some browser. But you can try this. [code] <form action='page2.php' method='post' target='_blank'> [/code] All version of IE supports the target='_blank' tags. | |
Re: [QUOTE=;][/QUOTE] Anyway are you creating Log in script or a Sign up script? But anyway, try this Jrotunda. (taga pinas ka ba?) [code] <?php //maybe your need here something like... $input_username = $_POST['username']; // user input. This is the value that will be check if already exist in the DB … | |
Re: [QUOTE=;][/QUOTE] Just put your update query at the top, so when the page was load, the script update first the record and then display the result. Try the code below. [code] <?php $con = mysql_connect("localhost","root",""); $sql = mysql_select_db("luweegee",$con); ?> <html> <head><link rel='stylesheet' type='text/css' href='Style.css'/></head> <body> <table border=0 align='center' width=900 cellpadding=20 … | |
Re: [QUOTE=;][/QUOTE] try this. [code] <img src='<?php echo $targetpath;?>'> [/code] If this code don't work, maybe you can post your viewproducts script here. | |
Re: [QUOTE=;][/QUOTE] I modified your code. Take a look at the * sign. * is partner with *, and ** is partner with **, and *** is partner with ***, and so on The problem is you have { in your foreach, and yet you forgot to put } at the … | |
Re: [QUOTE=;][/QUOTE] Try this update query; [code] mysql_query("UPDATE resume SET resume.name='$_POST[name]' WHERE id='".$id."')"; mysql_query("UPDATE resume SET resume.age='$_POST[age]' WHERE id='".$id."')"; mysql_query("UPDATE resume SET resume.mobile='$_POST[mobile]' WHERE id='".$id."')"; mysql_query("UPDATE resume SET resume.sex='$_POST[sex]' WHERE id='".$id."')"; [/code] | |
Re: [QUOTE=;][/QUOTE] Try this script: Imagine that your table has the following fields: item_name, price, and item_id for the ID for each items. [code] <?php error_reporting(0); session_start(); //your db connection here. // First, query all the items in your table. $query = mysql_query("SELECT * from table_name"); echo "<table>"; echo "<tr>"; echo … | |
Re: [QUOTE=;][/QUOTE] Try this sample idea. First, create a table with the following fields. user_name,user_img and user_id. Set user_id as your primary key. It can be integer that increment automatically. Save the table as userfile Create a PHP connection script. In this example we save it as connection.php. Below is the … | |
Re: [QUOTE=;][/QUOTE] Maybe the problem is *. Try the sample query of olawale. | |
Re: [QUOTE=;][/QUOTE] Can you give some example code for us to have an idea regarding your script? | |
Re: [QUOTE=;][/QUOTE] Try this code. I modified it. [code] <?php echo "<h1>Register</h1>"; $submit = $_POST["submit"]; $usernamenew = strip_tags($_POST["usernamenew"]); $passwordnew = md5(strip_tags($_POST["passwordnew"])); $repeatpasswordnew = md5(strip_tags($_POST["repeatpasswordnew"])); $email = $_POST["email"]; $date = date(Y-m-d); if ($_POST['submit']=="Create Account") { //check for existence if ($usernamenew=="" || $passwordnew=="" || $repeatpasswordnew=="" || $email=="") { echo "Please fill in all … | |
Re: [QUOTE=;][/QUOTE] Try to use <br> [code]; <?php echo "Hello World!!"."<br>"."Im new to php";//sample 1 echo "Hello World!! <br> Im new to php";//sample 2 ?> [/code] | |
Re: [QUOTE=;][/QUOTE] this should work [code] <?php include "sql_connect.php"; $text = $_POST['text']; $test = mysql_query("SELECT * FROM Movies WHERE Mov_ID = '".$text."'"); ?> [/code] | |
Re: [QUOTE=;][/QUOTE] I think ditty was right. There should be "Where" in the query so that the script can identify the record you want to update. Something like this. [code] <?php // Connects to your Database mysql_connect("localhost", "john", "nicho123") or die(mysql_error()); mysql_select_db("john_321") or die(mysql_error()); echo "connected to database"; $update = "UPDATE … | |
Re: [QUOTE=;][/QUOTE] Try this: [code] <td><img src="<?php echo $image;?>"></td> [/code] | |
Re: [QUOTE=;][/QUOTE] Try this Joe. Just find out the difference of the 3 query. ^^, [code] $Find_Query1 = mysql_query("SELECT * FROM pages WHERE title='$Search' AND keywords LIKE '%$Search%' AND description LIKE '%$Search%'"); // between // or $Find_Query1 = mysql_query("SELECT * FROM pages WHERE title='$Search' AND keywords LIKE '$Search%' AND description LIKE … | |
Hi to all again, Can anyone one help me with this? The scenario goes like this. I have this PHP script: [code] <?php $to = "email_address_here"; $subject = "SAMPLE AUTOMATIC MAIL"; $body = "Hi to Every one. Please help me with this ^^,"; if (mail($to, $subject, $body)) { echo("<p>Message successfully … | |
Re: [QUOTE=;][/QUOTE] Where the clients (name,id, etc.) information stored? I mean are you used mysql database? | |
Re: [QUOTE=;][/QUOTE] Try this: 1. Why don't create a page where your sql connection is coded. For example, create a php script and save it as connection.php and here is the code for it. [code] <?php error_reporting(0); $connection = Mysql_connect('localhost','root',''); mysql_select_db('test'); //test is the name of your database. ?> [/code] Now … | |
Hi again to all, Can anyone know how to do this? [code] <?php // let say the time now is 06:00 PM $time = Date('h:i A'); $time1 = strftime('$time'); // I know it is wrong coz the output of this code is $time only. I just include this for you … | |
Re: [QUOTE=;][/QUOTE] I think you can save the image on the server drives but not on the database itself. The path of the image is the one that saves in the database. | |
Re: [QUOTE=;][/QUOTE] I'm not so sure, but try this: [code] <?php $username = 'username'; $password = 'password'; if (isset($_POST["username"]) && isset($_POST["password"])) { // open text.txt for reading $file = fopen("text.txt","r"); while (!feof($file)) { $data = explode ("|", fgets($file)); if(isset($data[0]) && isset($data[1])){ if (trim($data[0]) == trim($_POST["username"]) && trim($data[1]) == trim($_POST["password"])) { $login … | |
Re: [QUOTE=;][/QUOTE] try this: <select name="con_st" > <?php $sql = "SELECT distinct con_stat FROM contst"; // $rs = mysql_query($sql); // you can eliminate this code while($row = mysql_fetch_array($sql)) // change $rs into $sql { echo "<option value='$row[con_stat]'>".$row['con_stat']."</option>"; } ?> </select> | |
Hi to all. Can anyone help me with this? I have PHP script the save record. But I want to have time limit in saving the record. When the local time is 4:00 PM, the user can no longer save their record. Please help. Here's my code; if($_POST['submit']=="Save") { $name … |
The End.