if im reading your code right... i think where you have $fullname=""... you are saying that, that variable $fullname is nohthing... so you have to define that variable. in the video, it is being defined as 1. if you want information that a user is submitting in a form to wqual that variable, define that variable by using the $_POST or $_GET (whichever method you are using)
i think that might be an issue, i hope im right and have not led you in the wrong direction! let me know!
Caruso Nicholas L wrote: > So I've been trying to figure this out for like 6 hours now and I'm staring at the same code and not figuring anything out! I have my database all set up, and most of my code written, but I seem to be missing 1 line of crucial code that actually puts the info into my database. > > That said, this is the part of the video lecture I don't really get: > > $success = 1; > $shape = 1; > $ip = "placeholder"; > > I'm not sure what this part of the code is actually doing. > > Right now, my own code reads (and this is where I'm sure the error(s) lies: > > $fullname = ""; > $email = ""; (// I still don't know what to put in the these " " since they're all varchar data > $comments = ""; types. Is that my problem!?) > > $sql = "INSERT INTO soup2 (fullname, email, comments); VALUES ('".$fullname."','".$email."','".$comments."');";
Yeah...I've clearly been failing in trying to define the variables. Will try this out...thanks for the tips and response!
-Nick
Kuban Ellise J wrote: > Hi! > > if im reading your code right... i think where you have $fullname=""... you are saying that, that variable $fullname is nohthing... so you have to define that variable. in the video, it is being defined as 1. if you want information that a user is submitting in a form to wqual that variable, define that variable by using the $_POST or $_GET (whichever method you are using) > > > i think that might be an issue, i hope im right and have not led you in the wrong direction! let me know! >
if im reading your code right... i think where you have $fullname=""... you are saying that, that variable $fullname is nohthing... so you have to define that variable. in the video, it is being defined as 1. if you want information that a user is submitting in a form to wqual that variable, define that variable by using the $_POST or $_GET (whichever method you are using)
i think that might be an issue, i hope im right and have not led you in the wrong direction! let me know!
Caruso Nicholas L wrote:
> So I've been trying to figure this out for like 6 hours now and I'm staring at the same code and not figuring anything out! I have my database all set up, and most of my code written, but I seem to be missing 1 line of crucial code that actually puts the info into my database.
>
> That said, this is the part of the video lecture I don't really get:
>
> $success = 1;
> $shape = 1;
> $ip = "placeholder";
>
> I'm not sure what this part of the code is actually doing.
>
> Right now, my own code reads (and this is where I'm sure the error(s) lies:
>
> $fullname = "";
> $email = ""; (// I still don't know what to put in the these " " since they're all varchar data
> $comments = ""; types. Is that my problem!?)
>
> $sql = "INSERT INTO soup2 (fullname, email, comments); VALUES ('".$fullname."','".$email."','".$comments."');";
-Nick
Kuban Ellise J wrote:
> Hi!
>
> if im reading your code right... i think where you have $fullname=""... you are saying that, that variable $fullname is nohthing... so you have to define that variable. in the video, it is being defined as 1. if you want information that a user is submitting in a form to wqual that variable, define that variable by using the $_POST or $_GET (whichever method you are using)
>
>
> i think that might be an issue, i hope im right and have not led you in the wrong direction! let me know!
>