Hi all,
I hope you're having a good day. I'm 15 and as a way to earn some money this this year I am thinking of starting a small web development business. I have knowledge in HTML (4 and 5), CSS (2 and 3), PHP 5, SQL, and some knowledge of Javascript.

I don't think that my knowledge (or lack of) would be a downside, as I have already designed sites for small businesses in my area. I was thinking of charging per page, and about $15-30 for an HTML and CSS, or $40-50 for a full PHP. If you were looking at hiring a web developer what would you think? Are these prices reasonable?

Thank you in advance!

-Thanks,
Patrick

Hi,
I made a login form on my site but I am new to javascript and do not know how this could be done (See title).
I am trying to make an alert start if one of the login forms are left empty. Any advice is greatly appreciated, thanks in advance!

Ex:
[CODE]
<html>
<head>
<title>Login</title>
<script type="text/javascript">
function show_alert(){
alert("Please make sure all fields are entered!");
}
</script>
</head>
<body>
<?php
echo " <form action='' method='POST'>
Username: <input type='username' name='username'>
Password: <input type='password' name='password'>
<input type='submit' value='Login'>
</form>";
if ($_POST){
$username = mysql_escape_string($_POST['username']);
$password = mysql_escape_string($_POST['password']);
if ($username&&$password){
//Standard login script...
} else {
//How do I start the javascript if this is true????
}
}
?>
</body>
</html>
[/CODE]

Ok, thanks! I feel stupid for making such a simple mistake...

Hi all!
I'm a new to PHP and I embarked on a making a small store. One part of this involves making a form to add new products, and tables for categories. But I am getting this error:
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' on line 17

I don't find anything wrong with my code.
[CODE]<?php
if ($_POST){
$adding = mysql_escape_string($_POST['add_category']);
echo "Adding ".$adding ." to products...<br />";
$mysql_connection = mysql_connect("host", "username", "password");
if (!$mysql_connection) die("<font color='red'><b>MySQL connection error, process halted!</b></font>");
if (!mysql_select_db("products", $mysql_connection)) die ("Unable to select database, process halted!");
$get_categories = mysql_query("SELECT * FROM categories");
echo 'Checking if category already exists...<br />';
while ($row = mysql_fetch_assoc($get_categories)){
$name = $row['category_name'];
if ($adding != $name){
echo "Category does not exist...<br />
Adding...<br />";
$add_categories = mysql_query("INSERT INTO categories VALUES ('', '$adding')");
echo "Successfully inserted into database...<br />"
$create_table = mysqlquery(" CREATE TABLE products.$adding (
`item
#VARCHAR( 9 ) NOT NULL , nameVARCHAR( 1000 ) NOT NULL , priceVARCHAR( 9 ) NOT NULL , descriptionVARCHAR( 9999999 ) NOT NULL , short_descriptionVARCHAR( 50000 ) NOT NULL , image` VARCHAR( 9999999 ) NOT NULL
) ENGINE = MYISAM ;");
echo "Successfully created table...<br />";
} else {
echo " <font color='red'>Category exists, process halted...</font><br />
<a href='index.php?page=login'>Click here to return to the form.</a>";
};
}
}
?>[/CODE]
Thank you in advance!

Hi,
Today I set up a NFS with Windows Server 2003 R2, and I was writing a .cmd file to back up the C:/Documents and Settings/ folder to the NFS (Network File System).

I'm having a problem with the parameters of the xcopy (Copies folders and subfolders), I'd really appreciate it if you could help me out with this!
Code:

echo off
title Welcome %USERNAME%
cls
:TOP 
color 0a
cls
echo %USERNAME%, Would you like to back-up your files since last shutdown?
set /p input="Y/N:"
if %input%==yes goto :BACKUP
if %input%==Yes goto :BACKUP
if %input%==y goto :BACKUP
if %input%==YES goto :BACKUP
if %input%==Y goto :BACKUP
if %input%==n goto :EXIT
if %input%==no goto :EXIT
if %input%==N goto :EXIT
if %input%==NO goto :EXIT
:BACKUP
title Backing-Up 
color 0c
cls
echo Please do not interrupt the backup, your system will resume after...
xcopy C:/Documents and Settings/%USERNAME%/My Documents/ \\murray-da3892f9\Shared\%USERNAME%\ /e/i
pause >nul
:EXIT
exit

Hi all,
I'm working on a login system for my site. But when I use mysql_num_rows I get an error [CODE]"Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/patrickm129/patthepcwizard.com/login02.php on line 25"[/CODE]. I'd really appreciate it if you would be able to solve this with me.

P.S.: The error is in login02.php.
<p></p>
[B]login.php[/B]
[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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
}
-->
</style></head>

<body>

<form action='login02.php' method="post">
<p>Username:
<input type="text" name="username">
<br>Password:
<input type="password" name="password">
<br>
<input type="submit" value="Login">
</p>
</body>
</html>
[/CODE]
[B]login02.php[/B]
[CODE]<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
}
-->
</style>
<?php

$username = $_POST['username'];
$password = $_POST['password'];

if ($username&&$password)
{
//Connect to DB
$mysql_connection = mysql_connect("My DNS", "USERNAME", "PASSWORD");
if (!$mysql_connection) die("mysql_connect() failed");
if (!mysql_select_db("DB NAME", $mysql_connection)) die("mysql_select_db() failed");
//Accesses users
$query = mysql_query("SELECT * FROM users WHERE login='$username'");
//Checks if users do not exist (Checks rows)
$num_result = mysql_num_rows($query);
echo $num_result;
}
else
die("Opps! It looks like you left a field empty!");
?>[/CODE]

Hello,
I'm trying to learn Python to get ahead in school but don't know where to start. I already have a shell and SW installed on my machine to write the code, but I can't find a good index of the codes. What would you suggest I do or learn first?

-Thanks, Pat

This would really help with my security software, and my batch-exe converter. Thanks!

This worked exactly how I would like it, thanks!
[QUOTE=lastpilgrim;1276045]Hi

If I understand you right you just want to merge the two bits of code in your post
and put the output (Ip addreess) out to the 'Hello World.txt' file.

if so the following should do it or if I've got it wrong then sorry!

[CODE]
myfilename = "\Hello World.txt"
MakeHelloWorldFile myfilename

Sub MakeHelloWorldFile (FileName)
'Create a new file in C: drive or overwrite existing file
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(FileName) Then
Answer = MsgBox ("File " & FileName & " exists ... OK to overwrite?", vbOKCancel)
'If button selected is not OK, then quit now
'vbOK is a language constant
If Answer <> vbOK Then Exit Sub
Else
'Confirm OK to create
Answer = MsgBox ("File " & FileName & " ... OK to create?", vbOKCancel)
If Answer <> vbOK Then Exit Sub
End If

'Create new file (or replace an existing file)
Set FileObject = FSO.CreateTextFile (FileName)

' *** New line to O/P Ip address
FileObject.WriteLine "Ip ... " & GetIP
FileObject.WriteLine "Time ... " & Now()
FileObject.WriteLine "Test123"
FileObject.Close()
MsgBox "File " & FileName & " ... updated."
End Sub

' *** New Function (Code 2) to return Ip address

Function GetIp()

strcomputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

for each objitem in colitems

strIPAddress = Join(objitem.IPAddress, ",")
ip = stripaddress

' wscript.echo ip
next
GetIP ...

Hello,
I am making a *.vbs file and I need help putting two codes in.
The first code is to make a .txt file named "Hello World", with the text in the .txt file "Time ... (your time)-Test123"

Code:
[CODE]myfilename = "\Hello World.txt"
MakeHelloWorldFile myfilename

Sub MakeHelloWorldFile (FileName)
'Create a new file in C: drive or overwrite existing file
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(FileName) Then
Answer = MsgBox ("File " & FileName & " exists ... OK to overwrite?", vbOKCancel)
'If button selected is not OK, then quit now
'vbOK is a language constant
If Answer <> vbOK Then Exit Sub
Else
'Confirm OK to create
Answer = MsgBox ("File " & FileName & " ... OK to create?", vbOKCancel)
If Answer <> vbOK Then Exit Sub
End If
'Create new file (or replace an existing file)
Set FileObject = FSO.CreateTextFile (FileName)
FileObject.WriteLine "Time ... " & Now()
FileObject.WriteLine "Test123"
FileObject.Close()
MsgBox "File " & FileName & " ... updated."
End Sub[/CODE]
And the 2nd file I want to combine with this is to desplay the IP address of the machine. I would like to make it desplay the IP address in the .txt file, not as a msg box.
Code:
[CODE]strcomputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

for each objitem in colitems

strIPAddress = Join(objitem.IPAddress, ",")
IP = stripaddress
wscript.echo ip

next
[/CODE]

Thanks, but when I entered that into the code "Shell Error, vbMaximizedFocus" I keep getting an error message saying that the error is on that line in the first digit. The file is named Error.vbs I tried putting in the file extention and both times I still got an error message. Help?

[CODE]strtext="Test"
set objvoice=createobject("sapi.spvoice")
objvoice.rate=2
objvoice.speak strtext
do
Shell Error, vbMaximizedFocus
x=msgbox ("Screen test" ,0+16+4096, "Test")
loop
[/CODE]
[QUOTE=jhai_salvador;1271494]if you just need to open it, you can use SHELL in vb, something like this...
[CODE=vb]
Shell YourVBSFile, vbMaximizedFocus
[/CODE][/QUOTE]

Hello,
Can you help me... I am trying to make a vbs file that when you open it, it automaticly takes up the full screen. Do you know a code that will do this?
-Thanks

Thank You Very much!

[QUOTE=rch1231;1268064]Hello,

It is all in the redirects you use. > writes over the file if there is one and >> appends to the file.

echo "second line of code" >> \test.bat[/QUOTE]

Hello,

I recently learned a new batch command and I was wondering if I could make a batch file from at root batch file...
Ex:
[CODE]echo pause>\test.bat[/CODE] This code makes a batch file that has the command pause.

Now would I make a multi-line batch file using this code?
Ex: I want the root file to make a batch file that completes a C:\ tree and than changes color (tree, color 0a)?

-Thanks

Hello, I am trying to make a link to a certain area of the image (for a site map, using the mpa feature), How would I place this code in?

[code] <img src="http://www.mysite.com/images/header03.jpg" width="770" height="230" border="0" usemap="#Map" />
<map name="Map" id="Map"><area shape="rect" coords="291,195,366,227" href="http://mysite.index.html" />
<area shape="rect" coords="372,194,447,227" href="http://www.mysite.com/page1.html" />
<area shape="rect" coords="455,194,578,225" href="http://www.mysite.com/page2.html" />
<area shape="rect" coords="585,191,768,226" href="http://www.mysite.com/page3.html" /> [/code]

Please reply ASAP... Thanks!