Jump to content


Check out our Community Blogs

chili5

Member Since 12 Mar 2008
Offline Last Active Dec 02 2017 05:41 PM
-----

#373904 ***Textfield SELECT INSERTION HELP

Posted by chili5 on 15 August 2008 - 08:43 AM

Your welcome :D Need anything else just ask. :)
  • 1


#373869 ***Textfield SELECT INSERTION HELP

Posted by chili5 on 15 August 2008 - 05:17 AM

:D I tried it and it works. :) You might have to modify it to match your database a little. :)
  • -1


#373862 ***Textfield SELECT INSERTION HELP

Posted by chili5 on 15 August 2008 - 04:24 AM

Code for the search form:


<form action="search.php" method="post">
Id <input type="text" name="id" />
<p>
<input type="submit" value="Search" />
</p>


This file will send the POST data to search.php which will then connect to your database.

Search.php


<?php
// connect to database here

$sql = "SELECT * FROM age WHERE id='$_POST[id]'";
$result = mysql_query($sql);
?>
<form action="insert.php" method="post">
<?php
while ($row = mysql_fetch_array($result)) {
?>
id <input type="text" name="id" value="<?php echo $row['id'];?>" />
<br />
Name <input type="text" name="name" value="<?php echo $row['name'];?>" />
<br />
Age <input type="text" name="age" value="<?php echo $row['age'];?>" />
<?php
}
?>
<input type="submit" name="Insert" value="Insert" />
</form>


Then this file selects from the database, the record with the id that was supplied by the previous script. Then a loop through all the results and the values of each field is printed to the text box.

Then you are free to send this data off to another file. :)
  • 1


#372587 I'm Back...(XaNaX's Web-Site Thread)

Posted by chili5 on 07 August 2008 - 01:18 PM

Coo? Did xav make a new word? :P

Make sure it is valid XHTML :D Good luck dude. :)
  • 1


#372332 *OFFICIAL* - Post Your Desktop/Wallpaper

Posted by chili5 on 07 August 2008 - 04:34 AM

:) If your interested: 70+ Nice and Beautiful Firefox Wallpapers is where I found them. :D Came across the site by accident. Accidentely clicked a button in stumbleupon. :)
  • 1


#369085 Neat java Game!!!

Posted by chili5 on 29 July 2008 - 08:44 AM

story? i never read them :P

ok thanks :D nah, i don't use the shot gun :D
  • 1


#367347 CodeCall is seeking members for Design Team (Member Made)

Posted by chili5 on 25 July 2008 - 04:29 AM

So it is real ok. :D I didn't think it was with all the colors and large fonts. :)
  • 1


#367152 Starting from scratch

Posted by chili5 on 24 July 2008 - 09:07 AM

See that doesn't mean, that you changed "HTML" to "XHTML" you could have accidentally wrote your post in VB or something :)

Proof:

Posted Image

;)
  • 1


#363566 Starting a teenager programming?

Posted by chili5 on 09 July 2008 - 12:46 PM

I was wondering where the extra +rep came from. I love the php section, that's what I'm using to learn PHP and it even goes into MySQL some. It's just amazing :) You could probably learn to become a professional just from that site :D
  • 1


#363391 Starting a teenager programming?

Posted by chili5 on 09 July 2008 - 05:07 AM

Web Tutorials

Theirs tutorials for XHTML, CSS, JavaScript, PHP, ASP, ASP.NET :wink: and XML and a small Visual Basic one I think.
  • 1


#363021 Hi everybody!

Posted by chili5 on 07 July 2008 - 05:44 AM

Nope questions are fine :D

It all depends on what you want kind of applications you want to make:

Web sites: XHTML, CSS, JS, PHP, MySQL, Java, perl - all of these serve different purposes.
Windows: C#, Perl, C++
Cross platform: C++, perl maybe? i don't know much about perl.
  • 1


#357652 Starting a teenager programming?

Posted by chili5 on 04 June 2008 - 03:18 AM

I never said that python is better to use than C++ but C++ is a little complicated for a beginner to learn. If they know python it would be easier to learn C++ in the future. Yes they are powerful but they are also complicated to learn.
  • -1


#350630 Javascript to Add a Text Input field

Posted by chili5 on 11 April 2008 - 11:07 AM

I think this should do what you wanted:


<html>
<head>
<title></title>
<script language="javascript">
fields = 0;
function addInput() {
if (fields != 10) {
document.getElementById('text').innerHTML += "<br>Title: <input type='text' name='title' /><br />Name: <input type='text' name='name' /><br />Copy:

<input type='text' name='copy' /><br>";
fields += 1;
} else {
document.getElementById('text').innerHTML += "<br />Only 10 data entries allowed.";
document.form.add.disabled=true;
}
}

field = 0;
function addErase() {
if (field != 1) {
document.getElementById('erase').innerHTML += "<input type='button' onclick='reset()' value='Reset fields' />";
field += 1;
} else {
}
}
</script>
</head>
<body>
<form name="form" action="form.php" method="post">
Title: <input type="text" name="title" />
<br />Name: <input type="text" name="name" />
<br />Copy: <input type="text" name="copy" />
<p>
<div id="text">

</div>
</p>
<p>
<input type="button" onclick="addInput(),addErase()" name="add" value="Add input field" />
</p>


<br />
<input type="submit" value="Submit" />
<div id="erase">

</div>
</form>
</body>
</html>


the code you posted meant almost nothing to me lol, what language is it?
  • 1


#348089 show date using javascript

Posted by chili5 on 13 March 2008 - 04:39 PM

Put this in a javascript file called date.js

 var theMonths = new 

Array("January","February","March","April","May","June","July","August","September","Octo

ber","November","December");  
    dt = new Date();  
     function getLetter(n) {  
     if(n == 1 || n == 21 || n == 31) {  
         return "st";  
     } else if (n == 2 || n == 22) {  
         return "nd";  
     } else if (n == 3 || n == 23) {  
        return "rd";       }  
    return "th";  
}  
dy = dt.getDate();  
dy = dy + getLetter(dy) + " "; 
    mo = dt.getMonth();  
    yr = " "+dt.getFullYear(); 

and in your html file put this in your head:

<script src="date.js"></script>

and in your body

<script language="javascript">
document.write(dy+theMonths[mo]+yr);  
</script>

  • 1




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download