mysql_connect()

From: Date: Tue, 01 Aug 2000 14:40:07 +0000
Subject: mysql_connect()
Groups: php.db 
Request: Send a blank email to php-db+get-1668@lists.php.net to get a copy of this message
I am getting the error message: "Fatal error: Call to unsupported or undefined function mysql_connect() in /home/httpd/html/WizardnonJSP/uploadfile.php3 on line 10" I know my code works, I am just trying to impliment it on a different server. Out of curiosity do you guys/gals think this is an install issue? -Greg My code (I replaced IP's and such): <?php $TheID = $HTTP_GET_VARS[id]; if ($submit) { $relative = $HTTP_POST_VARS[relative]; $host = "IP"; $username = "user"; $password = "pass"; $db = "profiles"; mysql_connect($host,$username,$password); mysql_select_db($db); $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype,relative) ". "VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type','$relative')"); $id= mysql_insert_id(); MYSQL_CLOSE(); $relative = $HTTP_POST_VARS[relative]; header ("Location: newlocation"); exit; } else { ?> <HTML> <HEAD><TITLE>Store binary data into SQL Database</TITLE></HEAD> <BODY> <b>Step 4: </b>Complete this if you are ordering our <b><font color="#FF0000">Wizard Analysis</font></b><font color="#000000">.</font> <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> <input type="hidden" name="relative" value="<? print($TheID); ?>"> File Description:<br> <input type="text" name="form_description" size="40"> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </BODY> </HTML>

« previous php.db (#1668) next »