vaultdweller123 32 Posting Pro

firefox is the best! specially in web development! because of it's cool add-ons like firebug. can't live without it.

vaultdweller123 32 Posting Pro

I mean, I already caught you doing it once. and I can't believe you are still doing it. try doing some of your own work instead of attempting to take credit for others, vaultdweller123

yeah your right :D

vaultdweller123 32 Posting Pro

huh?

vaultdweller123 32 Posting Pro

is this solved? OMG! im too late! yeah will is right? i recommend use session, it's the best approach to your problem.

vaultdweller123 32 Posting Pro

yezzz use PHP function implode()

vaultdweller123 32 Posting Pro

yezzz its very clear that baidu is afraid of the new search engine to hit their country. So they plan a demolition job.

@sodabread: of course they will get a higher market, It would be a shame if google has high market over baidu having them 1st over google china to establish there. i bet if they start at the same time. i dont think they can dominate google.

vaultdweller123 32 Posting Pro

WTF? your kiddin right? ahahaha this is a comedy

vaultdweller123 32 Posting Pro

bullseye almostbob, that excalty my point! hehe

vaultdweller123 32 Posting Pro

a bad database design. If you have a field that stores multi values, you should not store them in 1 field comma separated. You should make another table for it. A one-to-many relationship and link them via foreign key.

vaultdweller123 32 Posting Pro

PHP - server-side programming
MySQL - database

the link there is you can do programming with database.

vaultdweller123 32 Posting Pro

that error only means that you specify an incorrect path to PHP function include() or the file you wish to include does not exist.

vaultdweller123 32 Posting Pro

this is a very funny thread. specially the PHP definition from samarudge. lol

vaultdweller123 32 Posting Pro

PHP is free

vaultdweller123 32 Posting Pro

can you show us your start code? so we can add up the functionalities you want.

vaultdweller123 32 Posting Pro

this is an interesting thread... im also curios if you there is a way on solving that problem coz. the back button is specially made for that... for viewing your previously viewed page. i dont know if there's really a code for that.. i dont know... maybe?

vaultdweller123 32 Posting Pro

yezzz manish and almostbob are correct. i recommend you use notepad++ as your editor, beside the coloring capability, notepad++ detects the start and ending tags and braces/blocks which is very cool and helpful.

vaultdweller123 32 Posting Pro

i forgot to use bbcode sorry... hehe

foreach($_GET['chk'] as $val){
$x++;
}

foreach($_GET['chk'] as $val){
$y++;
if($y<$x){
echo $val.",";
}else{
echo $val;
}
}
vaultdweller123 32 Posting Pro

tried and tested.
<?php

foreach($_GET as $val){
$x++;
}

foreach($_GET as $val){
$y++;
if($y<$x){
echo $val.",";
}else{
echo $val;
}
}

?>

please mark this solved, if you think we solved it... thanks

vaultdweller123 32 Posting Pro

use css, put an inline style rule, add style attribute on body tag.

style="background-image:url('image.jpg')"
vaultdweller123 32 Posting Pro

if above still doesnt work... try this.

<?php
echo "<a href='pg2.php?row1=".$row1[0]."'>CLICK ME!</a>"; 
?>
vaultdweller123 32 Posting Pro

yezz i check your code and i didnt find anything wrong there... try revising the code like this.

<?php 
echo "<a href='http://somewhere/pg2.php?row1=".$row1[0]."'>CLICK ME!</a>"; 
?>
vaultdweller123 32 Posting Pro

why not use forearch() instead of your while(list($key,$ars)=each($ar))??? you like complicated stuff? it think your image folder contains 4 images, coz the end of your loop depends on your $ar=scandir("hairupdo"); which is the location of the images.

vaultdweller123 32 Posting Pro

you need a wysiwyg editor. i only know 2 examples of this editor. fckeditor and tinymce. they are freeware so you can download them for free.

vaultdweller123 32 Posting Pro

yeah im totally aware of that, but im just using simple example here for easy understanding.

vaultdweller123 32 Posting Pro

ok takeshi you know the drill replace database table that suites your needs.

Tried and tested

<?php

mysql_connect('localhost','root','');
mysql_select_db('joe');

?>
<?php

if(isset($_GET['btndelete'])){
$account = $_GET['account'];
if(isset($account)){
foreach($account as $val){
mysql_query( "DELETE FROM account WHERE account_id='".$val."'" );
}
}
}

?>


<html>
<head>
<title>
confirm
</title>
<script>
function deleterec(){
if(confirm("Are you sure you want to delete?")){
return true;
}else{
return false;
}
}
</script>
</head>
<body>
<form name='frm' method='get' onsubmit='return deleterec()'>
<table border='1'>
<tr>
<td>check</td><td>name</td><td>age</td>
</tr>
<?php
$sql = mysql_query( "SELECT * FROM account" );
while($row=mysql_fetch_array($sql)){
echo "<tr>
<td>
<input type='checkbox' name='account[]' value='".$row['account_id']."'></td><td>".$row['name']."<td>".$row['email']."</td>
</tr>";
}
?>
</table>
<input type='submit' name='btndelete' value='delete' />
</form>
</body>
</html>

please marked this thread solved if you think it's been solved... thanks.

vaultdweller123 32 Posting Pro

you mean want to change your dropdown without without refreshing the page? then use AJAX

vaultdweller123 32 Posting Pro

you want to add the location on the database? then just insert your $dest variable into your database.

assuming you had these table and variables
you query should look like this

INSERT INTO your_table(name,date,location) VALUES('$name','$date','$dest');

vaultdweller123 32 Posting Pro

yeah kishan is right u need just a simple query

<?php

$sql = mysql_query( "SELECT name FROM candidate" );
while($row = mysql_fetch_array($sql)){
echo $row['name']."<br />";
}

?>

here try this link so you have full understanding on traversing query results http://www.w3schools.com/PHP/func_mysql_fetch_array.asp

vaultdweller123 32 Posting Pro

hehe that code is familiar... ill help you takeshi when you still got problems.... when i get home and after i had my 8 hour sleep. coz im working now and i can't do that right now hehe.

vaultdweller123 32 Posting Pro

just use "POST" instead of "post". post must be in capitals... and yeah one more mistake you have done in this code is, you have set action="", it means that form will not save that value.

what the hell are you talking about dude? do u know how code PHP? form method 'post' and 'POST' are the same... there is no issue about that.... and also there's no problem setting form action attribute to none (action=''). i dont even put action attribute on my form and i can still get the values. There no problem to a form like this example.

<?php

if(isset($_POST['btnlog-in'])){
$user =  $_POST['username'];
$pass = $_POST['password'];
}

?>

<form method='post'>
<input type='text' name='username' />
<input type='password' name='password' />
<input type='submit' name='btnlog-in' value='log-in' />
</form>
vaultdweller123 32 Posting Pro

your code is a mess... arrange it neatly.

<?php 

session_start(); 
if (!$_SESSION["valid_user"]) { // User not logged in, redirect to login page
Header("Location: login.php"); 
}
// Member only content // ... // ... // ... // Display Member information 

echo "User ID: " . $_SESSION["valid_id"]; 
echo "Username: " . $_SESSION["valid_user"]; 
echo "Logged in: " . date("m/d/Y", $_SESSION["valid_time"]); // Display logout link 
echo "Click here to logout!"; 

?>
vaultdweller123 32 Posting Pro

I would prefer PHP over JAVA...

PHP = less code, light, no compile, easy to learn, use variable directly without declaration

JAVA = hard code, heavy, compile to run, hard to learn, strict variable-must declare

hugeee.. difference....

vaultdweller123 32 Posting Pro

you have to study error handling.... you have to work on try catch

vaultdweller123 32 Posting Pro

all you need is this query...

<?php $sql = mysql_query( "UPDATE price SET prod_price = (prod_price * .10)" ); ?>
vaultdweller123 32 Posting Pro

Ask the person who design your database...he's the only one who can answer you why he saves record about info of your images on your database and uploaded images but doesn't link them. I think the images field should contain the source/path of the images for you to to be able to display them.

vaultdweller123 32 Posting Pro

and you can get your database back via import.

vaultdweller123 32 Posting Pro

u dont need php script just to retrieve records... all you have to do is go to phpmyadmin and then export database and a sampledatabase.sql will be given to you. dont worry... its not a big file... it's just a plain text...

vaultdweller123 32 Posting Pro

ok but ill use a simple example for this one...
1st u need 2 files and a database

lets assume you got these tables, and ill make this simple but you can add more fields...

candidate
can_id = int, primary, autoincrement
name = varchar
votes = int
category = varchar

voter
voter_id = int, primary, autoincrement
name = varchar

then the files.

index.php

<?php
	
	if(isset($_GET['btnsubmit'])){
	
	$can = array($_GET['pres'],$_GET['vp']);
	

	
	mysql_connect('localhost','root',''); // i use default, but use your custom DBMS log-in
	mysql_select_db('takeshi'); // sample database, i user your name.. hehe
	
	foreach($can as $val){
	$sql = mysql_query( "UPDATE candidate SET votes=votes+1 where can_id='".$val."'" );
	}
	
	echo "<h1>vote complete!</h1>
	<a href='voteresult.php'>see all vote results</a>";
	
	
	}else{



	echo "<form method='get'>
      <h2><center>Select Candidates</h2>
	  
	  <h3>president:</h3>
	  1.) naruto <input type='radio' name='pres' value='1'><br />
	  2.) sasuke <input type='radio' name='pres' value='2'>
	  
	  <h3>vice-president:</h3>
	   1.) neji <input type='radio' name='vp' value='3'><br />
	  2.) lee <input type='radio' name='vp' value='4'>
	
		<p><input type='submit' name='btnsubmit' value='VOTE'></p>
	  </form>";
	  
	  }
	  
	  ?>

voteresult.php

<?php


mysql_connect('localhost','root',''); // i use default, but use your custom DBMS log-in
mysql_select_db('takeshi'); // sample database, i user your name.. hehe

echo "<h3>vote results</h3>";

$sql = mysql_query( "SELECT * FROM candidate WHERE category='president'" );
echo "<h4>President</hr>
<table>
<tr>
<th>name</th><th>votes</th>
</tr>";
while($row = mysql_fetch_array($sql)){
echo "<tr>
<td>".$row['name']."</td><td>".$row['votes']."</td>
</tr>";
}
echo "</table>";

$sql2 = mysql_query( "SELECT * FROM candidate WHERE category='vice-president'" );
echo "<h4>Vice-President</hr>
<table>
<tr>
<th>name</th><th>votes</th>
</tr>";
while($row2 = mysql_fetch_array($sql2)){
echo "<tr>
<td>".$row2['name']."</td><td>".$row2['votes']."</td>
</tr>";
}
echo "</table>";





?>

i just provide the major functionalities you seek and …

vaultdweller123 32 Posting Pro

also even i set resizable=no i dont know in ie but in my current browser which is firefox... it's still resizable... so i google it out and found out some huge bug discussion....

https://developer.mozilla.org/en/DOM/window.open
a part of that link says:

resizable
If this feature is set to yes, the new secondary window will be resizable.
Note: Starting with version 1.4, Mozilla-based browsers have a window resizing grippy at the right end of the status bar, this ensures that users can resize the browser window even if the web author requested this secondary window to be non-resizable. In such case, the maximize/restore icon in the window's titlebar will be disabled and the window's borders won't allow resizing but the window will still be resizable via that grippy in the status bar.

and you can also read their bug reviews here
https://bugzilla.mozilla.org/show_bug.cgi?id=177838

vaultdweller123 32 Posting Pro

u need to files for these

1.) newwindow.php
2.) newwindow2.php

1.) newwindow.php

<a href="#" onclick="window.open('newwindow2.php','_blank','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=400, height=200');">click me</a>

2.)newwindow2.php

<img src='images/sulik.jpg'><br />

description: We and i know so many Things.... travel from great saltwater to home of biting lizard

i know how to make iframe but i dont know where you want it to be put... so this is it for the moment.... iframe is easy to add.

vaultdweller123 32 Posting Pro

damn.... typo error again.. hehe

select p.pricerange, a.accomodationname, a.contactperson ...... etc. from acc_info as a join price as p where a.acc_ID = p.acc_ID

vaultdweller123 32 Posting Pro

sorry i made typo error... here it is again

select p.pricerange, a.accomodationname, a.contactperson ...... etc. from acc_info as a join price as p where a.acc_ID = b.acc_ID

if you had trouble understanding the query, read it here
http://w3schools.com/sql/sql_join.asp

vaultdweller123 32 Posting Pro

your priceID should be set to primary key autoincrement. and you should add additional field, you can name it to acc_id, a foreign key which stores the acc_id of table acc_info. then you can query it to something like this

select p.price, a.accomodationname, a.contactperson ...... etc from acc_info as a join price as p where a.accID = b.priceID...

vaultdweller123 32 Posting Pro

then mark this thread solved then.... marking thread solved is a way of saying thank you.

vaultdweller123 32 Posting Pro

it's very useful dude... joins are used when combing two tables. learn it here http://w3schools.com/sql/sql_join.asp

vaultdweller123 32 Posting Pro

if the above reply didn't work then use css.

vaultdweller123 32 Posting Pro

wow. grow up. and stop copying my posts

sorry but i don't copy on dumb person... ur just a feeler... ahaha

vaultdweller123 32 Posting Pro

what? copying you? u got the nerve to say that? why should i copy you what to i get from that? im here to help and learn. Your too full of yourself! if i would copy someone, i would select a more smarter person rather than you. i would prever copy ardav over to you. >:(

vaultdweller123 32 Posting Pro

google it out

vaultdweller123 32 Posting Pro

oh yeah... i think you got syntax error

$sql="SELECT * FROM $tbl_name WHERE id_no='$username' and password='$password='";

you put = after the password, it may be the result why you got no results coz. the query doesn't satisfy the condition.