Jump to content

stvchez

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

stvchez's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm not sure what is going on because I have iteration working on my other pages. basically, with the attached code, I am getting the same first record 15 times. am I missing anything? //code $query = "SELECT * FROM testTableNames ORDER BY ID"; $result = mysql_query($query, $link); ?> <table> <tr> <td>ID</td> <td>First Name</td> <td>Last Name</td> <td>City</td> <td>State</td> <td>Zip Code</td> </tr> <?php // get number of rows $num=mysql_numrows($result); echo"debug num rows: $num"; // set variables $FirstName=mysql_result($result,$i,"FirstName"); $LastName=mysql_result($result,$i,"LastName"); $Address1=mysql_result($result,$i,"Address1"); $City=mysql_result($result,$i,"City"); $State=mysql_result($result,$i,"State"); $ZipCode=mysql_result($result,$i,"ZipCode"); $ID=mysql_result($result,$i,"ID"); $i=0; while ($i < $num) { ?> <tr> <td> <?php echo$ID ?> </td> <td><?php echo$FirstName ?></td> <td> <?php echo$LastName ?> </td> <td> <?php echo$City ?> </td> <td> <?php echo$State ?> </td> <td> <?php echo$ZipCode ?> </td> </tr> <?php $i++; } ?> </table>
  2. that sounds exactly like what I would need. I have not use the fgetcsv function before. would it be possible to send a quick code snippet or point me in the right direction to research this out thanks
  3. I have a question about an admin webpage to upload incremental csv files to a master table. Here is what I do currently: - I get an excel file (turn it into a csv) - go to phpMyAdmin and upload the csv from the SQL tab simple, it works. What I would like to do is this: have the client upload the same .csv file via a webpage, a form upload field, which in turn, adds the few more records to the existing table. When I upload via phpMyAdmin, i see the SQL that it spits out, but not sure how to implement. If anyone has done a similar project, I'd much appreciate it. thanks
  4. I have site for a client that I've been working on. anyways, they have a master signup speadsheet, it gets progressively updated, and they send it to over me. I full by doing an SQL import of that csv file. I've now down this mysql update 10 times, and wonder if there is another solution. Basically, I just need an easy way, be it an upload form, or whatever, for them to easily transfer their excel updates. thanks
  5. i have check all folders. there is no bulk folder with any of the received msgs there. also, while testing, I turned off the zone alarm spam filtering that I have in place
  6. thanks for your reply. I feel like i've been going around in circles. I'm using two of my test accounts. When I send the post to my gmail account, it makes it there everytime. When I send to my comcast email, it never makes it no matter what I try. The code is the same for the two
  7. this should be fairly straightforward. I need to simply send mail to a desired address. I'm using the mail function, and doesn't seem to be working.. <form action="contactMail.php" method="post"> <table cellpadding=2 cellspacing=0 border=0> <tr><td><b>Sender</b></td><td><input type="text" name="you"></td></tr> <tr><td><b>Recipient</b></td><td><input type="text" name="to"></td></tr> <tr><td><b>Title</b></td><td><input type="text" name="tit"></td></tr> <tr><td><b>Message</b></td><td><textarea rows=6 cols=16 name="msg" ></textarea></td></tr> <tr><td> </td><td><input type="submit" value="Send Now"></td></tr> </table> </form> <?php if ($_SERVER["REQUEST_METHOD"]=="POST"){ mail($_POST['to'], $_POST['tit'], $_POST['msg'],"From:" . $_POST['you']); } ?>
  8. I'm trying to email password results to users. They are getting the results mailed to them, so that is working, but are just receiving the username in both fields. here's my code and wonder where I am off.. $query = "SELECT username,password FROM tblNamesMain WHERE Email='$to'"; $result = mysql_query($query, $link); $username=mysql_result($result,"username"); $password=mysql_result($result,"password"); $body = "Here is your user Athletic Endurance account information that you requested.\n\nUsername: ".$username."\nPassword: " .$password." "; mysql_close($conn); if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); ....
  9. here is the php code from each page. thanks. // page1 session_start(); $username = $_POST['username']; echo"$username"; // value: test123 $password = $_POST['password']; $_SESSION['sessUser'] = $username; $_SESSION['loggedin'] = "true"; session_register("username"); session_register("password"); header("Location: /virtual-coach/calendarHome.php"); } page 2 session_start(); $username = $_SESSION['sessUser']; $loggedin = $_SESSION['loggedin']; echo print_r($_SESSION); echo "$username";
  10. I get this in return. Array ( ) 1
  11. I'm not sure what is going on. yesterday, session management was working. today, I cannot get a session to pass from page to page no matter what I try. // page 1 $username = $_POST['username']; $_SESSION['sessUser'] = $username; //page 2 session_start(); $username = $_SESSION['sessUser']; echo"$username"; //nothing... is there any troubleshooting methods or anything that I could try?
  12. Hi, i'm attempting to do a simple conditional select of by the url date variable. here's the month get: $m = $_GET['m]; // m = 2 <select name="date_month"> <OPTION VALUE="01">01</OPTION> <OPTION VALUE="02">02</OPTION> <OPTION VALUE="03">03</OPTION> <OPTION VALUE="04">04</OPTION> then, something along lines of: if ($m == ...) { echo"SELECTED"; }
  13. is there a secret w/ the textarea field that I'm missing. here is what I have: <textarea name=\"description\" value=$description rows=5 cols=40></textarea> (input type=text value=$description does show a value) thanks
  14. thanks for helping. I went through that process and figured out the problem line and the page is now working.
×
×
  • 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.