Jump to content

Eds100503

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Eds100503's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi projectfear and thanks for your response.. As a matter of fact it is been loaded yes... And I even tried loading myself the head and script src on the local signup.html file and Jquery still not been loaded .. I do not know why .. Thanks Ed
  2. OK guys please bear with me as this is going to be a little long post. Thanks in advanced for all the help i can get. Ed I am sorry i am a noob on all this. Now on to the problem. I have on my server the aMember script installed and as some of you guys know it works with CSS and Smarty Template Engine. the Signup page is been constructed by three files .. Signup.php which in turn displays the signup.html page in my templates folder. Signup.html load or includes header.html from the same folder. Now on the header.html i put the code of the <head> tag like always <script src ...> loading all the JS libraries. But the libraries actually do not get loaded. I am uploading the three files here in a ZIP file so you guys can have a look at them and try to tell me what am i doing wrong and you guys can point me in the right direction. On the server side i am using Centos 5.5 with apache and php 5 and mySQL server. The html folder is owned not by apache but by another group. Inside the html folder the normal folders including the SMARTY folder templates and templates_c (for temporary cache files) The signup.php page is on the root folder calling the signup.html from templates and this one includes the header at the same time. All the page are CHMOD 644 and the JS are residing in a root folder named JS where all the .js files are. All the .js files are CHMOD 644 as well. Please help me ASAP. Thanks Ed [attachment deleted by admin]
  3. Hi guys. First off thank you to everyone in this site for all the help that only reading has been to me. I am a TOTAL newbie on PHP so please bear with me. Second off .. I would like to explain to you what i am trying to do... The office executive comes into our site and registers himself on the member part of it. What i am trying to do is for every executive to have the option of choosing an image from all the images that are in the images folder that are pulled from the database. The database has a table called picks which has 2 fields. ID - INT - AutoInc and fname - char - 255 which in turn is the full name of the image. Now i am trying to on the signup page to of course ask to everything needed no biggie here .. and after that .. to show on a table (from an array) the images which it does already but i have no idea how to approach on how to create the radio button. Because when the radio buttons are displayed only the first one and the last one coincide .. You see .. the images table follows an order from top to bottom and then from left to right .. but the buttons are following a different order ... from left to right then top to bottom.. making accurate only the first and the last button ... for him/her to check on it and then put the name of that image into his/her member table. This is my code so far .. <? include 'include/func.php'; ?> <html> <head> <title>Sign Up for a New Member</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php function sql_safe($s) { if (get_magic_quotes_gpc()) $s = stripslashes($s); return mysql_real_escape_string($s); } if(isset($_POST['add'])) { //This is the directory where images will be saved $target = "call_images/"; $target = $target . basename( $_FILES['photo']['name']); $username = $_POST['username']; $password = $_POST['password']; $fname = $_POST['fname']; $lname = $_POST['lname']; $email_ = $_POST['email_']; $email_2 = $_POST['email_2']; $radioOption = $_POST['$radioOption']; $pic=($_FILES['photo']['name']); include 'include/func.php'; $query = "INSERT INTO amember_control (fname, lname, email, pix, password) VALUES ('$fname', '$lname', '$email_', '$radioOption', '$password')"; mysql_query($query) or die('Error, insert query failed'); //Writes the photo to the server if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } include 'include/closedb.php'; echo "New Member has been added"; } else { ?> <form action="" method="post" enctype="multipart/form-data" name="uploadform"> <table width="470" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="116">First Name:</td> <td colspan="2"><input name="fname" type="text" id="fname"></td> </tr> <tr> <td width="116">Last Name:</td> <td colspan="2"><input name="lname" type="text" id="lname"></td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> <tr> <td width="116">Email:</td> <td colspan="2"><input name="email_" type="text" id="email_"></td> </tr> <tr> <td>Re-Type Email:</td> <td colspan="2"><input name="email_2" type="text" id="email_2"></td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> <tr> <td>Password:</td> <td colspan="2"><input name="password" type="password" id="password"></td> </tr> <tr> <td>Re-Type Pass:</td> <td colspan="2"><input name="password2" type="password" id="password2"></td> </tr> <tr> <td> </td> <td colspan="2"> </td> </tr> <?php $columns = 3; $query = "SELECT id, fname, photo FROM picks ORDER BY fname"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); $rows = ceil($num_rows / $columns); echo '<ul>'; while($row = mysql_fetch_array($result)) { $data[] = "<img src=http://www.xxxxx.com/aMember/call_images/".$row['photo'] .">"; //store the other field into an array $data2[] = $row['fname']; $data3[] = $row['id']; } echo "<TABLE BORDER=\"1\" cellpadding=0 cellspacing=10>\n"; $e=0; for($i = 0; $i < $rows; $i++) { echo "<TR>\n"; for($j = 0; $j < $columns; $j++) { if(isset($data[$i + ($j * $rows)])) { echo "<TD align=center>" . $data[$i + ($j * $rows)] . " "; $e<=count($data2); echo("<input type=\"radio\" name=\"radioOption\" value=\"" . $e . "\" id=\"option" . $e . "\"><label for=\"option" . $e . "\">" . $data2[$e] . "</label>"); $e++; } } echo "</TR>\n"; } echo "</TABLE>\n"; echo '</ul>'; $id = $_POST['id']; include 'include/closedb.php'; ?> <tr> <td width="116">Picture</td> <td> </td> <td><input type="hidden" name="MAX_FILE_SIZE" value="2000000"><input name="photo" type="file" class="box" id="photo"></td> </tr> <tr> <td width="116"> </td> <td colspan="2"><input name="add" type="submit" id="add" value="Add New User"></td> </tr> </table> </form> <?php } ?> </body> </html> Sorry about the big post guys. Thanks in advanced for all the help. Have a great weekend everyone. Ed
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.