Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
6
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
0 Endorsements
Ranked #818
~50.1K People Reached
Favorite Tags

61 Posted Topics

Member Avatar for fariba123

[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; …

Member Avatar for bhagyashree.bhatt2
1
1K
Member Avatar for lyrico

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 …

Member Avatar for diafol
0
764
Member Avatar for kirtan_thakkar

[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]

Member Avatar for msnadz
0
3K
Member Avatar for cheesywan
Member Avatar for lyrico

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 …

Member Avatar for whiteyoh
0
300
Member Avatar for lyrico

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 …

Member Avatar for pritaeas
0
85
Member Avatar for singularity~

[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]

Member Avatar for veedeoo
0
876
Member Avatar for lyrico

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' …

Member Avatar for lyrico
0
248
Member Avatar for lyrico

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'> …

Member Avatar for Dandello
0
94
Member Avatar for Virangya

[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) / …

Member Avatar for lyrico
1
14K
Member Avatar for lyrico

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.

Member Avatar for Stefano Mtangoo
0
113
Member Avatar for lyrico

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 …

Member Avatar for lyrico
0
131
Member Avatar for lyrico

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 …

Member Avatar for ko ko
0
127
Member Avatar for lyrico

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 …

Member Avatar for Kraai
0
113
Member Avatar for samsnov

[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 …

Member Avatar for samsnov
0
254
Member Avatar for phpbeginners

[QUOTE=;][/QUOTE] Maybe it can by signing out into the website and not by closing the browser.

Member Avatar for diafol
0
150
Member Avatar for lyrico

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 …

0
74
Member Avatar for jacob21

[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]

Member Avatar for tomato.pgn
0
334
Member Avatar for Tempest will

[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]

Member Avatar for vibhaJ
0
114
Member Avatar for daniel7912

[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 ?> …

Member Avatar for lyrico
0
241
Member Avatar for ahsan1

[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]

Member Avatar for lyrico
0
70
Member Avatar for Fresco Vivir

[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 …

Member Avatar for lyrico
0
91
Member Avatar for Kadafiz

[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 …

Member Avatar for lyrico
0
2K
Member Avatar for xuexue

[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' …

Member Avatar for happytogether
0
189
Member Avatar for Lirans
Member Avatar for 333Geek
0
168
Member Avatar for lhyndel

[QUOTE=;][/QUOTE] There are lots of tutorial inside the net. Try to google it. The tutorials are easy to follow.

Member Avatar for royng
0
78
Member Avatar for kedar9

[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.

Member Avatar for kedar9
0
191
Member Avatar for jrotunda85

[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 …

Member Avatar for Javvy
0
270
Member Avatar for luweegee

[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 …

Member Avatar for lyrico
0
192
Member Avatar for banmikko

[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.

Member Avatar for smantscheff
0
205
Member Avatar for TheIdiot

[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 …

Member Avatar for TheIdiot
0
152
Member Avatar for luweegee

[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]

Member Avatar for luweegee
0
164
Member Avatar for dudzkie

[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 …

Member Avatar for dudzkie
0
105
Member Avatar for tcollins412

[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 …

Member Avatar for lyrico
0
124
Member Avatar for tcollins412

[QUOTE=;][/QUOTE] Maybe the problem is *. Try the sample query of olawale.

Member Avatar for lyrico
0
120
Member Avatar for tcollins412

[QUOTE=;][/QUOTE] Can you give some example code for us to have an idea regarding your script?

Member Avatar for nuttyniall
0
175
Member Avatar for guggilosmodz

[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 …

Member Avatar for lyrico
0
91
Member Avatar for puvi

[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]

Member Avatar for lyrico
0
167
Member Avatar for ON_Jtharpe

[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]

Member Avatar for lyrico
0
245
Member Avatar for captain.don

[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 …

Member Avatar for lyrico
0
110
Member Avatar for phpDave

[QUOTE=;][/QUOTE] Try this: [code] <td><img src="<?php echo $image;?>"></td> [/code]

Member Avatar for phpDave
0
112
Member Avatar for Joe34

[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 …

Member Avatar for lyrico
0
75
Member Avatar for lyrico

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 …

Member Avatar for lyrico
0
2K
Member Avatar for tcollins412
Re: help

[QUOTE=;][/QUOTE] Where the clients (name,id, etc.) information stored? I mean are you used mysql database?

Member Avatar for lyrico
0
74
Member Avatar for panagosa

[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 …

Member Avatar for MindSter
0
132
Member Avatar for lyrico

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 …

Member Avatar for lyrico
0
113
Member Avatar for tape enterprise

[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.

Member Avatar for tape enterprise
0
159
Member Avatar for paolonewage

[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 …

Member Avatar for paolonewage
0
101
Member Avatar for altarek

[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>

Member Avatar for altarek
0
205
Member Avatar for lyrico

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 …

Member Avatar for lyrico
0
189

The End.